title: Iterate over list of list of maps in terraform
body: <p>Consider I have a variable that is a list of list of maps.</p>
  
  <p>Example: </p>
  
  <pre><code>    processes = [
        [
         {start_cmd: "a-server-start", attribute2:"type_a"}, 
         {start_cmd: "a-worker-start", attribute2:"type_b"}
         {start_cmd: "a--different-worker-start", attribute2:"type_c"}
        ],
        [
         {start_cmd: "b-server-start", attribute2:"type_a"},
         {start_cmd: "b-worker-start", attribute2:"type_b"}
        ]
      ]
  </code></pre>
  
  <p>In each iteration, I need to take out the array of maps, then iterate over that array and take out the values of the map. How do I achieve this in terraform?</p>
  
  <p>I have considered having two counts and doing some arithmetic to trick terraform into performing a lookalike nested iteration <a href="https://serverfault.com/questions/833810/terraform-use-nested-loops-with-count">Check reference here</a>. But in our case the number of maps in the inner array can vary. </p>
  
  <p>Also we are currently using the 0.11 terraform version but dont mind using the alpha 0.12 version of terraform if it is possible to achieve this in that version.</p>
  
  <p>Edit:</p>
  
  <p>Added how I would use this variable:</p>
  
  <pre><code>resource “create_application” “applications” {
    // Create a resource for every array in the variable processes. 2 in this case
    name        = ""              
    migration_command = "" 
  
    proc {                
      // For every map create this attribute for the resource.
      name    = ““                
      init_command   = “a-server-start”                   
      type   = “server”                
    }                                    
  }                                      
  </code></pre>
  
  <p>Not sure if this clears up the requirement. Please do ask if it is still not clear.</p>