-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
add support for min_num_instances in google_dataproc_cluster #9150
Conversation
Hello! I am a robot. It looks like you are a: Community Contributor @rileykarson, 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. |
mmv1/third_party/terraform/services/dataproc/resource_dataproc_cluster.go
Outdated
Show resolved
Hide resolved
mmv1/third_party/terraform/services/dataproc/resource_dataproc_cluster.go
Outdated
Show resolved
Hide resolved
@@ -2557,6 +2589,9 @@ func flattenInstanceGroupConfig(d *schema.ResourceData, icg *dataproc.InstanceGr | |||
data["num_instances"] = icg.NumInstances | |||
data["machine_type"] = tpgresource.GetResourceNameFromSelfLink(icg.MachineTypeUri) | |||
data["min_cpu_platform"] = icg.MinCpuPlatform | |||
if icg.MinNumInstances != 0 { |
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.
Rather than just guard on the value being nonzero, we should pass through the type of config we're checking and write the value conditionally. If the API began to allow a minimum number of primary instances and started passing through a value to a user (a backwards compatible change), the user would get an error on their next Terraform run as we tried to write to a value that didn't exist.
region = "us-central1" | ||
|
||
cluster_config { | ||
master_config{ |
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.
nit: Do you mind spacing these lines as two spaces rather than tabs, for consistency within the config?
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 3 files changed, 84 insertions(+), 8 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccContainerCluster_withAddons|TestAccContainerNodePool_withUpgradeSettings|TestAccContainerNodePool_withKubeletConfig|TestAccDataprocCluster_withMinNumInstances|TestAccDataSourceGoogleServiceAccountAccessToken_basic|TestAccDataSourceGoogleServiceAccountIdToken_impersonation|TestAccWorkstationsWorkstationConfig_update |
Rerun these tests in REPLAYING mode to catch issues
|
…rate them similar to secondary workers
…ate after cluster creation.
Generating to run tests- will make a full review pass tomorrow. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 4 files changed, 734 insertions(+), 140 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccAlloydbCluster_secondaryClusterMandatoryFields|TestAccAlloydbBackup_alloydbBackupFullExample|TestAccBigQueryDataTable_bigtable|TestAccDataprocCluster_withMinNumInstances |
Rerun these tests in REPLAYING mode to catch issues
|
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.
LGTM, thanks! Especially for going ahead and splitting those out 🎉
Release Note Template for Downstream PRs (will be copied)