title: Terraform: " Error creating Firewall: googleapi: Error 403: Required 'compute.firewalls.create' "
body: <p>I´m stuck on this script to deploy an image in GCP with Terraform. The idea is launching a V instance and have opened the ports 443 and 80 for http requests, when i writte &quot;Terraform validate&quot; it is shown as correct:</p>
  <pre><code>provider &quot;google&quot; {
    project     = &quot;terraform-packer-xxxxxx&quot;
    region      = &quot;us-central1&quot;
    zone        = &quot;us-central1-a&quot;
    credentials = &quot;C:/.../path&quot;
  }
  
  
  data &quot;google_compute_image&quot; &quot;test&quot; {
    name = &quot;packer-08022021-1&quot;
  }
  
  
  resource &quot;google_compute_instance&quot; &quot;myVM&quot; {
    name         = &quot;test&quot;
    machine_type = &quot;e2-micro&quot;
    zone         = &quot;us-central1-a&quot;
    tags = [ &quot;http-server&quot; ]
    boot_disk {
      initialize_params {
        image = data.google_compute_image.test.self_link
      }
    }
    network_interface {
      # A default network is created for all GCP projects
      network = &quot;default&quot;
      access_config {
      }
    }
  }
  
  resource &quot;google_compute_firewall&quot; &quot;allow-http&quot; {
    name    = &quot;http-firewall&quot;
    network = &quot;default&quot;
  
    allow {
      protocol = &quot;all&quot;
      ports    = [&quot;80&quot;]
    }
  
      allow {
      protocol = &quot;all&quot;
      ports    = [&quot;443&quot;]
    }
  
      allow {
      protocol = &quot;all&quot;
      ports    = [&quot;22&quot;]
    }
  
    source_tags = [&quot;http-server&quot;]
  }
  
  # resource &quot;google_compute_network&quot; &quot;default&quot; {
  #   name = &quot;test-network&quot;
  # }
  
  output &quot;ip&quot; {
   value = google_compute_instance.myVM.network_interface.0.access_config.0.nat_ip
  }
  </code></pre>
  <p>But when i writte &quot;Terraform apply&quot; this error apears:</p>
  <pre><code>Error: Error creating Firewall: googleapi: Error 403: Required 'compute.firewalls.create' permission for 'projects/terraform-packer-303806/global/firewalls/http-firewall'
  More details:
  Reason: forbidden, Message: Required 'compute.firewalls.create' permission for 'projects/terraform-packer-303806/global/firewalls/http-firewall'
  Reason: forbidden, Message: Required 'compute.networks.updatePolicy' permission for 'projects/terraform-packer-303806/global/networks/default'
  </code></pre>
  <p>I have doublechecked for the permissions in my service account and i have the following:
  Admin of compute instances,
  User of service acount,
  Networking admin,
  Firewall admin.</p>
  <p>I don't know what i'm doing wrong</p>