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
I am trying to install VPC Peering between networks belonging to different GCP projects ("HUB VPC Project" and "Spoke VPC Project"). But I can’t do this - get the following error:
Error: Error adding network peering: googleapi: Error 403: Required 'compute.networks.addPeering' permission for 'projects/nc-iac-test-280514/global/networks/vpc-gcp-hub-vpc', forbidden
on .terraform/modules/vpc-peering/modules/vpc-peering/main.tf line 10, in resource "google_compute_network_peering" "peering2":
10: resource "google_compute_network_peering" "peering2" {
ERROR: Job failed: exit code 1
The error occurs because the Terraform script is executed using the credentials of a service user owned by "Spoke VPC Project" and, accordingly, has rights only to "Spoke VPC Project" ( = do not have rights for "HUB VPC Project").
From the technical documentation, I see that at the moment there is no technical possibility to create a service user (terraform user) for the all Organization with access rights to all projects within this Organization. A service user can only be created for a specific project within the Organization (separate service users for "HUB VPC Project" and "Spoke VPC Project".
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!
Current Terraform Version
Terraform v0.12.17
Public Cloud Provider
provider.google-beta: version = "~> 3.26"
Description of the issue
I am trying to install VPC Peering between networks belonging to different GCP projects ("HUB VPC Project" and "Spoke VPC Project"). But I can’t do this - get the following error:
The error occurs because the Terraform script is executed using the credentials of a service user owned by "Spoke VPC Project" and, accordingly, has rights only to "Spoke VPC Project" ( = do not have rights for "HUB VPC Project").
From the technical documentation, I see that at the moment there is no technical possibility to create a service user (terraform user) for the all Organization with access rights to all projects within this Organization. A service user can only be created for a specific project within the Organization (separate service users for "HUB VPC Project" and "Spoke VPC Project".
Terraform Script - Repo "Spoke VPC Project"
Terraform Script - Repo "git.netcracker.com/Personal.Public_Cloud_Support/Google/Google_Modules.git//modules/vpc-peering"
Question
How to solve this issue: create VPC Peering between "HUB VPC Project" and "Spoke VPC Project" using terraform ?
The text was updated successfully, but these errors were encountered: