You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works fine in the standalone project case. For shared-VPCs, the network sting needs to include the host project number, not the service project number.
Describe the bug
Creating a PVC fails when using a shared-VPC on GCP. Please see details below.
Environment
Create two projects in GCP. Make one project into a host project by sharing its VPC to the other project (which becomes a service project). See https://cloud.google.com/vpc/docs/provisioning-shared-vpc
Root cause analysis and problem resolution
CVS API expect the service project number. This is build in gcp/api/gcp.go in makeURL:
The same project number is used to craft the network parameter:
trident/storage_drivers/gcp/gcp_cvs.go
Line 719 in b0d5734
This works fine in the standalone project case. For shared-VPCs, the network sting needs to include the host project number, not the service project number.
This is how this was solved for the CVS/GCP Terraform provider: https://github.com/NetApp/terraform-provider-netapp-gcp/blob/28a6f92d1eb5a2250a1398966bd6ed5eaf9a6be0/gcp/volume.go#L314
The text was updated successfully, but these errors were encountered: