Skip to content

Conversation

mariammartins
Copy link
Contributor

This PR contains the addition of a depends_on with the resources that add projects to the perimeter, in the resources that create ingress policies, correcting the error generated by the VPC Service Controls module when it needs to add a project to the perimeter, and create an ingress rule for the same project, at the same time.

Error: Error creating ServicePerimeterIngressPolicy: googleapi: Error 400: Invalid Directional Policies set in Perimeter 'accessPolicies/ACCESS_CONTEXT_MANAGER_ID/servicePerimeters/SERVICE_PERIMETER_NAME': Error in IngressTo: 'projects/PROJECT_NUMBER is defined in IngressTo.resources, but it is not present in ServicePerimeterConfig.resources. Only resources protected by this Service Perimeter can be put in IngressTo.resources.

With the addition of this depends_on, the module will always add the project before creating the ingress policy for it.

@mariammartins mariammartins requested review from a team and imrannayer as code owners August 7, 2025 17:22
Copy link
Contributor

@apeabody apeabody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mariammartins!

@apeabody apeabody merged commit afa2f87 into terraform-google-modules:main Aug 7, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants