magic-modules icon indicating copy to clipboard operation
magic-modules copied to clipboard

container add support for all GA fields in `auto_provisioning_defaults`

Open dysosmus opened this issue 4 years ago • 16 comments

This MR is an upstream from https://github.com/hashicorp/terraform-provider-google/pull/10610. It implements (or move to) multiple GA field parts of the cluster_autoscaling from the google_container_cluster resource.

Do note that some behaviours still need to be better defined:

  • boot_disk_kms_key, is optional but apparently once set it seems not possible to go back to GCP managed encryption, it however can be changed to another key.
  • disk_type, image_type, disk_size_gb, are all optional and computed but once set there is no way to go back to the initial default.

If this PR is for Terraform, I acknowledge that I have:

  • [X] Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • [X] Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • [X] Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • [ ] Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • [X] Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

container: added `disk_size_gb`, `disk_type`, `boot_disk_kms_key`, `image_type`,  `shielded_instance_config`, `management`, `upgrade_settings` fields under `cluster_autoscaling.auto_provisioning_defaults` for `google_container_cluster`.
container: moved `cluster_autoscaling.auto_provisioning_defaults.min_cpu_platform` to GA for `google_container_cluster`
container: moved `cluster_autoscaling.autoscaling_profile` to GA for `google_container_cluster`

dysosmus avatar Nov 25 '21 20:11 dysosmus

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review.

Thanks for your contribution! A human will be with you soon.

@melinath, please review this PR or find an appropriate assignee.

modular-magician avatar Nov 25 '21 20:11 modular-magician

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 613 insertions(+), 9 deletions(-)) Terraform Beta: Diff ( 3 files changed, 501 insertions(+), 55 deletions(-))

modular-magician avatar Nov 25 '21 21:11 modular-magician

Is there an update on this PR?

alexbacchin-asx avatar Jan 31 '22 10:01 alexbacchin-asx

/gcbrun

slevenick avatar Feb 01 '22 16:02 slevenick

Hello @slevenick, we are highly interested in this feature (especially the shielded_instance_config block). Do you have any idea when this will be integrated in the Terraform provider ? Thanks 😉

yannpichon-su avatar Feb 18 '22 08:02 yannpichon-su

/gcbrun

Looks like the build is blocked on some Terraform conversion fields. @melinath can you have a look and see what would need to change to get that step to run?

slevenick avatar Feb 22 '22 18:02 slevenick

Just kidding, it's a failure in the resource that shows up everywhere.

google/resource_container_cluster.go:371:10: duplicate key "image_type" in map literal
	previous key at google/resource_container_cluster.go:337:10

Looks like we have a duplicate declaration

slevenick avatar Feb 22 '22 18:02 slevenick

Unsubscribing - ping me again if needed!

melinath avatar Feb 22 '22 18:02 melinath

hey @dysosmus thanks for the contribution, do you believe you can move forward with this PR?

well-mushr avatar Mar 02 '22 13:03 well-mushr

@slevenick can you please try again?

alexbacchin-asx avatar Mar 09 '22 03:03 alexbacchin-asx

Looks like it still has the same error message:

resource_container_cluster.go:371:10: duplicate key "image_type" in map literal

slevenick avatar Mar 09 '22 22:03 slevenick

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 609 insertions(+), 10 deletions(-)) Terraform Beta: Diff ( 3 files changed, 497 insertions(+), 56 deletions(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

modular-magician avatar Mar 15 '22 16:03 modular-magician

/gcbrun

slevenick avatar Mar 16 '22 23:03 slevenick

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 609 insertions(+), 10 deletions(-)) Terraform Beta: Diff ( 3 files changed, 497 insertions(+), 56 deletions(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

modular-magician avatar Mar 17 '22 00:03 modular-magician

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceSqlDatabaseInstance_basic|TestAccApikeysKey_BasicKey|TestAccApikeysKey_AndroidKey|TestAccApikeysKey_IosKey|TestAccApikeysKey_MinimalKey|TestAccApikeysKey_ServerKey|TestAccArtifactRegistryRepository_create_mvn_snapshot|TestAccArtifactRegistryRepository_create_mvn_release|TestAccBigqueryReservationAssignment_BasicHandWritten|TestAccCGCSnippet_sqlMysqlInstanceBackupExample|TestAccCGCSnippet_sqlPostgresInstanceBackupExample|TestAccCGCSnippet_sqlSqlserverInstanceBackupExample|TestAccCGCSnippet_sqlMysqlInstanceAuthorizedNetworkExample|TestAccCGCSnippet_sqlSqlserverInstanceBackupLocationExample|TestAccCloudBuildTrigger_cloudbuildTriggerPubsubConfigExample|TestAccCloudBuildTrigger_cloudbuildTriggerWebhookConfigExample|TestAccCloudBuildTrigger_cloudbuildTriggerManualExample|TestAccCloudBuildTrigger_cloudbuildTriggerFilenameExample|TestAccCloudBuildTrigger_cloudbuildTriggerBuildExample|TestAccCloudBuildTrigger_basic|TestAccCloudBuildTrigger_available_secrets_config|TestAccCloudBuildTrigger_cloudbuildTriggerServiceAccountExample|TestAccCloudBuildTrigger_disable|TestAccCloudBuildTrigger_fullStep|TestAccCloudFunctionsFunction_secretEnvVar|TestAccContainerAwsCluster_BasicHandWritten|TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccContainerCluster_nodeAutoprovisioningDefaults|TestAccContainerCluster_nodeAutoprovisioningDefaultsDiskType|TestAccContainerCluster_nodeAutoprovisioningDefaultsDiskImage|TestAccContainerCluster_nodeAutoprovisioningDefaultsDiskSizeGb|TestAccContainerCluster_nodeAutoprovisioningDefaultsShieldedInstanceConfig|TestAccContainerCluster_nodeAutoprovisioningDefaultsManagement|TestAccContainerCluster_nodeAutoprovisioningDefaultsUpgradeSettings|TestAccContainerCluster_nodeAutoprovisioningDefaultsMinCpuPlatform|TestAccContainerCluster_nodeAutoprovisioning|TestAccContainerCluster_nodeAutoprovisioningDefaultsImageType|TestAccContainerNodePool_gvnic|TestAccDataprocCluster_nonPreemptibleSecondary|TestAccDataprocCluster_updatable|TestAccDataprocCluster_withConfigOverrides|TestAccNetworkServicesEdgeCacheOrigin_networkServicesEdgeCacheOriginAdvancedExample|TestAccNetworkServicesEdgeCacheOrigin_updateAndImport|TestAccNetworkServicesEdgeCacheService_networkServicesEdgeCacheServiceAdvancedExample|TestAccNetworkServicesEdgeCacheService_updateAndImport You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=269198

modular-magician avatar Mar 17 '22 02:03 modular-magician

It looks like several ContainerCluster tests are failing, like:

=== CONT  TestAccContainerCluster_nodeAutoprovisioningDefaultsManagement
provider_test.go:309: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) (len=5) {
... omitted

Are you able to run these tests successfully?

slevenick avatar Mar 22 '22 16:03 slevenick