title: possible to use for_each along with count to enable/disable a resource?
body: <p>I am trying to create reusable infrastructure  to enable/disable a resource by conditionally setting the count.  The problem is &quot;for_each&quot; &amp; &quot;count&quot; does not work together . Any other way to accomplish this ?</p>
  <pre><code>resource &quot;google_compute_subnetwork&quot; &quot;network-ip-ranges&quot; {
    count = var.vpc_network_firewall ? 1 : 0
    for_each      = var.subnets
    name          = each.key
    ip_cidr_range = each.value.cidr_block
    region        = each.value.region
    project       = google_project.sharedprojects[&quot;Shared-Dev-VPC&quot;].number
    network       = google_compute_network.sc_vpc_network.id
  </code></pre>