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

google_container_cluster: add Node auto-provisioning locations #11305

Merged

Conversation

prauc
Copy link
Contributor

@prauc prauc commented Jul 31, 2024

When Node auto-provisioning is enabled, the terraform provider currently cannot be used to define node auto-provisioning locations. This configuration is, as of today, presently limited to the UI, gcloud, or API.

Tests for google_container_cluster were already successfully executed locally

Release Note Template for Downstream PRs (will be copied)

container: added `auto_provisioning_locations` field to `google_container_cluster`

@github-actions github-actions bot requested a review from slevenick July 31, 2024 14:43
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@slevenick, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 4 files changed, 96 insertions(+))
google-beta provider: Diff ( 4 files changed, 96 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_container_cluster (373 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_container_cluster" "primary" {
  cluster_autoscaling {
    auto_provisioning_locations = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 200
Passed tests: 189
Skipped tests: 10
Affected tests: 1

Click here to see the affected service packages
  • container

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContainerCluster_autoprovisioningLocations

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccContainerCluster_autoprovisioningLocations[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$

View the build log or the debug log for each test

CheckDestroy: testAccCheckContainerClusterDestroyProducer(t),
Steps: []resource.TestStep{
{
Config: testAccContainerCluster_autoprovisioningLocations(clusterName, networkName, subnetworkName, locations),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add an update step for this field?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, np! done

@github-actions github-actions bot requested a review from slevenick July 31, 2024 17:02
Comment on lines +3990 to +4014
{
ResourceName: "google_container_cluster.with_autoprovisioning_locations",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"min_master_version", "deletion_protection"},
},
{
Config: testAccContainerCluster_autoprovisioningLocations(clusterName, networkName, subnetworkName, []string{"us-central1-b", "us-central1-c"}),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("google_container_cluster.with_autoprovisioning_locations",
"cluster_autoscaling.0.enabled", "true"),

resource.TestCheckResourceAttr("google_container_cluster.with_autoprovisioning_locations",
"cluster_autoscaling.0.auto_provisioning_locations.0", "us-central1-b"),

resource.TestCheckResourceAttr("google_container_cluster.with_autoprovisioning_locations",
"cluster_autoscaling.0.auto_provisioning_locations.1", "us-central1-c"),
),
},
{
ResourceName: "google_container_cluster.with_autoprovisioning_locations",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"min_master_version", "deletion_protection"},
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 4 files changed, 114 insertions(+))
google-beta provider: Diff ( 4 files changed, 114 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_container_cluster (373 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_container_cluster" "primary" {
  cluster_autoscaling {
    auto_provisioning_locations = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 200
Passed tests: 189
Skipped tests: 10
Affected tests: 1

Click here to see the affected service packages
  • container

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContainerCluster_autoprovisioningLocations

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccContainerCluster_autoprovisioningLocations[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$

View the build log or the debug log for each test

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

Thanks!

@slevenick slevenick merged commit 6333dff into GoogleCloudPlatform:main Jul 31, 2024
13 checks passed
Charlesleonius pushed a commit to Charlesleonius/magic-modules that referenced this pull request Aug 1, 2024
BBBmau pushed a commit to bschaatsbergen/magic-modules that referenced this pull request Aug 21, 2024
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.

3 participants