Skip to content

Commit

Permalink
Set config_sync.enabled field to true
Browse files Browse the repository at this point in the history
Terraform google provider v5.41.0 (released on Aug 12, 2024) introduced
a new field `config_sync.enabled` to the google_gke_hub_feature_membership
resource (b/322551829). The default value of this field is false.
However, when the field is omitted from the Terraform resource,
Terraform sets the field to false in the ACM Hub API explicitly. This
issue causes the Terraform users to fail to install Config Sync unless
they set the new field to true explicitly.

To mitigate this issue, we enhanced the Hub CLH to throw an error if
Config Sync is explicitly disabled and the Git or OCI configuration is
set.

Our Terraform users need to set the new field to true explicitly to
install Config Sync from v5.41.0. For existing CS installations,
upgrading from Terraform versions prior to v5.41.0 to versions >=
v5.41.0 does not break users, and does not uninstall Config Sync.
  • Loading branch information
haiyanmeng committed Oct 1, 2024
1 parent d1ffcee commit f525590
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ resource "google_gke_hub_feature_membership" "feature_member_1" {
configmanagement {
version = "1.18.2"
config_sync {
enabled = true
source_format = "hierarchy"
git {
sync_repo = "https://github.com/GoogleCloudPlatform/magic-modules"
Expand All @@ -125,6 +126,7 @@ resource "google_gke_hub_feature_membership" "feature_member_2" {
configmanagement {
version = "1.18.2"
config_sync {
enabled = true
source_format = "hierarchy"
git {
sync_repo = "https://github.com/terraform-providers/terraform-provider-google"
Expand Down Expand Up @@ -157,6 +159,7 @@ resource "google_gke_hub_feature_membership" "feature_member_1" {
configmanagement {
version = "1.18.2"
config_sync {
enabled = true
source_format = "hierarchy"
enabled = true
git {
Expand All @@ -176,6 +179,7 @@ resource "google_gke_hub_feature_membership" "feature_member_2" {
configmanagement {
version = "1.18.2"
config_sync {
enabled = true
source_format = "hierarchy"
git {
sync_repo = "https://github.com/terraform-providers/terraform-provider-google-beta"
Expand Down Expand Up @@ -214,6 +218,7 @@ resource "google_gke_hub_feature_membership" "feature_member_2" {
configmanagement {
version = "1.18.2"
config_sync {
enabled = true
source_format = "unstructured"
git {
sync_repo = "https://github.com/terraform-providers/terraform-provider-google-beta"
Expand Down Expand Up @@ -242,6 +247,7 @@ resource "google_gke_hub_feature_membership" "feature_member_3" {
configmanagement {
version = "1.18.2"
config_sync {
enabled = true
source_format = "hierarchy"
git {
sync_repo = "https://github.com/hashicorp/terraform"
Expand Down Expand Up @@ -424,6 +430,7 @@ resource "google_gke_hub_feature_membership" "feature_member" {
configmanagement {
version = "1.18.2"
config_sync {
enabled = true
git {
sync_repo = "https://github.com/hashicorp/terraform"
https_proxy = "https://example.com"
Expand Down Expand Up @@ -490,6 +497,7 @@ resource "google_gke_hub_feature_membership" "feature_member" {
configmanagement {
version = "1.18.2"
config_sync {
enabled = true
git {
sync_repo = "https://github.com/hashicorp/terraform"
https_proxy = "https://example.com"
Expand Down Expand Up @@ -562,6 +570,7 @@ resource "google_gke_hub_feature_membership" "feature_member" {
configmanagement {
version = "1.18.2"
config_sync {
enabled = true
git {
sync_repo = "https://github.com/hashicorp/terraform"
secret_type = "none"
Expand Down Expand Up @@ -651,6 +660,7 @@ resource "google_gke_hub_feature_membership" "feature_member" {
configmanagement {
version = "1.18.2"
config_sync {
enabled = true
source_format = "unstructured"
oci {
sync_repo = "us-central1-docker.pkg.dev/sample-project/config-repo/config-sync-gke:latest"
Expand Down Expand Up @@ -700,6 +710,7 @@ resource "google_gke_hub_feature_membership" "feature_member" {
configmanagement {
version = "1.18.2"
config_sync {
enabled = true
source_format = "hierarchy"
oci {
sync_repo = "us-central1-docker.pkg.dev/sample-project/config-repo/config-sync-gke:latest"
Expand Down

0 comments on commit f525590

Please sign in to comment.