Permission problem creating VPC Access connector

Terraform: v1.0.9, Ubuntu 20.04

When trying to create VPC Access connector, i.e.

resource "google_vpc_access_connector" "default-con" {
    provider            = google-beta
    name                = "default-con"
    project             = "myproject"
    region              = "us-central1"
    ip_cidr_range       = "10.8.1.0/28"
    network             = "default"
    machine_type        = "e2-micro"

    min_instances       = "2"
    max_instances       = "10"
    min_throughput      = "200"
    max_throughput      = "300"
}

I get the below at “apply” stage:

Error: Error creating Connector: googleapi: Error 403: The caller does not have permission
│ 
│   with google_vpc_access_connector.default-con,
│   on vpc_connectors.tf line 2, in resource "google_vpc_access_connector" "default-con":
│    2: resource "google_vpc_access_connector" "default-con" {

The corresponding service account has roles/compute.networkAdmin role assigned.

I haven’t found in GCP docs references of specific permissions for VPC Access connectors - does anyone have a clue which permissions are missing?

Thanks.

Hi there,

I ran into this issue earlier this week and what seemed to solve it for me was adding the
roles/vpcaccess.admin
to the service account running our terraforming.