-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
use the cluster subnet to look up the node cidr block #1783
use the cluster subnet to look up the node cidr block #1783
Conversation
Hi! I'm the modular magician, I work on Magic Modules. Pull request statusesNo diff detected in terraform-google-conversion. New Pull RequestsI built this PR into one or more new PRs on other repositories, and when those are closed, this PR will also be merged and closed. |
} | ||
} else { | ||
nodeCidrBlock := "" | ||
if c.Subnetwork != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since every cluster has a subnetwork, won't we be reading this in cases where create_subnetwork
isn't true
as well? I think we need to guard on that as well.
subnetwork_name
is only usable when create_subnetwork
is true
, so previously we were only filling in the value on a subset of cases where it was valid. Unless I'm missing something, after this change we'll fill it in whenever this block is returned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is that an issue if it's a computed field? (we still set the subnetwork name to the one returned in the ipallocationpolicy block, so it's only the nodeCidrBlock that gets filled in in more cases now)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! Ignore me, I didn't notice it was Computed
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind noting in the docs that the field relies on create_subnetwork
being true
? https://www.terraform.io/docs/providers/google/r/container_cluster.html#node_ipv4_cidr_block
Hi! I'm the modular magician, I work on Magic Modules. Pull request statusesterraform-provider-google-beta already has an open PR. New Pull RequestsI didn't open any new pull requests because of this PR. |
Tracked submodules are build/terraform-beta build/terraform-mapper build/terraform build/ansible build/inspec.
2f77c3f
to
749c077
Compare
Before, we read the SubnetworkName field in IpAllocationPolicy, which appears to not get set when we don't specify it directly.
This fixes TestAccContainerCluster_withIPAllocationPolicy_specificIPRanges
[all]
[terraform]
[terraform-beta]
[ansible]
[inspec]