Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make extended shared vpc attributes optional in project factory #1796

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

ludoo
Copy link
Collaborator

@ludoo ludoo commented Oct 23, 2023

Using coalesce to detect whether shared_vpc_service_config is present in a project YAML definition file is problematic, since all arguments to coalesce need to have the exact same type. Which then means the variable needs to be fully fleshed out and always include the optional attributes, or the two types will not match.

Example code needed with the current module:

parent: folders/12345678
shared_vpc_service_config:
  host_project: foo-host
  service_identity_iam: {}
  service_iam_grants: []

The above is needlessly verbose, and the error message when an attribute is missing is not intuitive. The code in this PR allows specifying just the project id:

parent: folders/12345678
shared_vpc_service_config:
  host_project: foo-host

@ludoo ludoo enabled auto-merge (squash) October 23, 2023 13:23
@ludoo ludoo merged commit 1ed48b5 into master Oct 23, 2023
13 checks passed
@ludoo ludoo deleted the ludo/pf-svpc-fix branch October 23, 2023 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants