-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: additional_ip_ranges_config - again #2458
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
base: main
Are you sure you want to change the base?
fix: additional_ip_ranges_config - again #2458
Conversation
|
/gcbrun |
1c84b6c to
8960c33
Compare
8960c33 to
a82e717
Compare
|
/gcbrun |
1 similar comment
|
/gcbrun |
|
/gcbrun |
|
Hi @DrFaust92 - I'm going to run the test again, but this is the only PR I'm currently seeing this error: |
|
/gcbrun |
|
Thanks @DrFaust92, still seeing: |
|
I don't think the additional_ip_ranges_config variable needs to be defined as a list... see my comment here -> #2437 (comment) |
db2480a to
faed61b
Compare
|
/gcbrun |
1 similar comment
|
/gcbrun |
|
/gcbrun |
|
apeabody, can you share the current failure? 🙏 |
Hi @DrFaust92 - Running again as I'm not convinced this is due to the change: |
I'm seeing the same error in #2466 |
Signed-off-by: drfaust92 <[email protected]>
Signed-off-by: drfaust92 <[email protected]>
|
on the side new smaller test works well, there is some race condition between changes that happen during create. with the "node_pool" config. so i copied the "simple_regional" one and added the additional_ip_ranges config for a dedicate test |
Signed-off-by: drfaust92 <[email protected]>
|
@apeabody if you can kickstart tests, local apply is passing |
|
/gemini review |
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.
Code Review
This pull request correctly fixes an issue with iterating over additional_ip_ranges_config in dynamic blocks across multiple module variants. The change to use additional_ip_ranges_config.value is the correct approach for accessing elements within a for_each loop. The addition of a new example and integration tests for this feature is a good improvement. However, I've identified an issue in the new integration test that will cause it to fail.
| clusterName := bpt.GetStringOutput("cluster_name") | ||
| serviceAccount := bpt.GetStringOutput("service_account") | ||
|
|
||
| op := gcloud.Runf(t, "container clusters describe %s --zone %s --project %s", clusterName, location, projectId) |
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.
The gcloud container clusters describe command is using the --zone flag for a regional cluster. Since this test is for a regional cluster, the --region flag should be used instead. The location output for a regional cluster is the region, so using it with --zone will cause an error.
| op := gcloud.Runf(t, "container clusters describe %s --zone %s --project %s", clusterName, location, projectId) | |
| op := gcloud.Runf(t, "container clusters describe %s --region %s --project %s", clusterName, location, projectId) |
|
/gcbrun |
|
/gcbrun |
|
Thanks @DrFaust92! This looks great, we just need to add the new integration test to the build: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/blob/main/build/int.cloudbuild.yaml#L514 Something like this: |
Signed-off-by: drfaust92 <[email protected]>
added |
|
/gcbrun |
1 similar comment
|
/gcbrun |
...ntegration/simple_regional_additional_ip_ranges/simple_regional_additional_ip_ranges_test.go
Outdated
Show resolved
Hide resolved
…egional_additional_ip_ranges_test.go
|
/gcbrun |
apologies, missed this again
Fixes: #2437