title: Subnets to AZs and repeat
body: <p>I want to build a 3 tier VPC using only AZ1a and AZ1b. But I want to have a range of IP addresses and use them for each tier but need them to always fall in AZ1a or AZ1b.</p>
  <p>I have 3 app tiers (web, app, db):</p>
  <p>Using only two AZs.</p>
  <pre><code>availability_zones = [&quot;us-east-1a&quot;, &quot;us-east-1b&quot;]
  </code></pre>
  <p>I have put together a list of the subnets I want to use. SoI want web to grab the first two and put into each of the AZs, then I want app to grab the next two and put into each of the AZs, and so on on.</p>
  <pre><code>private_subnets_cidr_intapp = [&quot;10.211.130.0/28&quot;, &quot;10.211.130.16/28&quot;, &quot;10.211.130.32&quot;, &quot;10.211.130.48&quot;, &quot;10.211.130.64/28&quot;, &quot;10.211.130.80/28&quot;]
  </code></pre>
  <p>How do you go about this, and an example would help. Should I be using a map?</p>