Terraform unable to recognize private service access connection for FileStore in Shared VPC

Hi There,

Terraform is not recognizing “private service access connection” in the host project part of the shared VPC setup. It is complaining on UNSUPPORTED argument : An argument named “connect_mode” is not expected here when trying to create a FileStore instance in the service project.

Terraform Version and Provider Versions:

Terraform v1.0.11
provider.google version = ">= 3.58, <= 4.28.0"
provider.google-beta ">= 3.39.0, <4.0.0"

Terraform Configuration Files

resource "google_filestore_instance" "filestoreinstance" {
  provider                     = google
  name                          = "${module.project.project_name}-filestore-usea4-fstore"
  project                       = module.project.project_id
  zone                           = var.zone
  tier                              = "BASIC_SSD"

  file_shares {
    capacity_gb = 2660
    name        = var.filestore_dir_name
  }
        
networks {
    network            = regex(".*/global/networks/(.*)$", local.vpc)[0]  //This is a shared VPC project name (or) Host Project
    modes              = ["MODE_IPV4"]
    connect_mode       = "PRIVATE_SERVICE_ACCESS"
  }
  
labels = var.labels
depends_on = [
    module.subnets,
    module.project
  ]
}

Expected Behavior

Terraform plan and apply should recognize that there is already a "private service access 
connection and create a FileStore instance. 

Actual Behavior

Error: Unsupported argument

  on main.tf line 199, in resource "google_filestore_instance" "ailoyalinstance":
 199:     connect_mode       = "PRIVATE_SERVICE_ACCESS"

Reference Docs:

Note: This works fine with GCloud SDK