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

fix: ignore control plane network when private endpoint subnet is set #2122

Conversation

wyardley
Copy link
Contributor

@wyardley wyardley commented Sep 27, 2024

Set master_ipv4_cidr_block to null when private_endpoint_subnetwork is set, as the two conflict with an API level error being thrown:
Error: googleapi: Error 400: When masterIpv4Cidr is set, privateEndpointSubnetwork must be unset.

Fixes #2119

This would have the effect of silently ignoring the setting even when master_ipv4_cidr_block is explicitly set. A better fix might be to throw an error, but given that there's a baked in default and that terraform module validation can't look at the values of other variables, I don't think that would be trivial.

@wyardley wyardley requested review from ericyz, gtsorbo and a team as code owners September 27, 2024 17:02
Set `master_ipv4_cidr_block` to `null` when
`private_endpoint_subnetwork` is set, as the two conflict.

Fixes terraform-google-modules#2119
@wyardley wyardley force-pushed the wyardley/issues_2119/private_endpoint_subnetwork branch from d20738b to 2426401 Compare September 27, 2024 17:11
@apeabody
Copy link
Contributor

/gcbrun

@apeabody apeabody self-assigned this Sep 27, 2024
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 for the contribution @wyardley!

@apeabody apeabody merged commit a4b130d into terraform-google-modules:master Sep 27, 2024
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.

private_endpoint_subnetwork not working
2 participants