From de7d39b50c5d9894e25770a457eb9ab2c2f96eaf Mon Sep 17 00:00:00 2001 From: sahsagar-google <126025352+sahsagar-google@users.noreply.github.com> Date: Tue, 12 Dec 2023 15:45:21 -0800 Subject: [PATCH] The version field should be under configmanagement instead of under oci (#9587) * Adding Terraform resources for Tenancy APIs in GKEHub * Segregating MembershipBinding and MembershipRBACRoleBinding to keep things simpler in the review * Fixing the docu URIs * Adding TF support for Tenancy API for Membership Binding * Adding dependent membership binding to the same commit chain * Making Scope un-updatable and replacing hard coded project number with the one from test env * Making Scope RRBAC updatable * Making Namespace immutable * Adding update test cases * Removing all memberships field from Scope since it is no longer supported * Removing all_memberships field for Scope from all test cases * Making naming in examples consistent across Tenancy APIs documentation * Update mmv1/templates/terraform/examples/gkehub_membership_binding_basic.tf.erb Co-authored-by: Shuya Ma <87669292+shuyama1@users.noreply.github.com> * Update mmv1/templates/terraform/examples/gkehub_membership_binding_basic.tf.erb Co-authored-by: Shuya Ma <87669292+shuyama1@users.noreply.github.com> * Update mmv1/templates/terraform/examples/gkehub_membership_rbac_role_binding_basic.tf.erb Co-authored-by: Shuya Ma <87669292+shuyama1@users.noreply.github.com> * Fixing typo in the resource name * Adding state migrations for Membership * Updating the feature_membership documentation with the current resource state. Adding membership_location field to the doc * Fixing the version field to be directly under configmanagement instead of under the oci field * Adding tests for the field version * Changing version fields value to test upgradation --------- Co-authored-by: Shuya Ma <87669292+shuyama1@users.noreply.github.com> --- mmv1/products/gkehub2/Feature.yaml | 6 +++--- .../services/gkehub2/resource_gke_hub_feature_test.go.erb | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mmv1/products/gkehub2/Feature.yaml b/mmv1/products/gkehub2/Feature.yaml index 67be3b1efc02..b3968b337586 100644 --- a/mmv1/products/gkehub2/Feature.yaml +++ b/mmv1/products/gkehub2/Feature.yaml @@ -215,6 +215,9 @@ properties: name: configmanagement description: Config Management spec properties: + - !ruby/object:Api::Type::String + name: version + description: 'Version of ACM installed' - !ruby/object:Api::Type::NestedObject name: configSync description: 'ConfigSync configuration for the cluster' @@ -271,9 +274,6 @@ properties: - !ruby/object:Api::Type::String name: syncWaitSecs description: 'Period in seconds between consecutive syncs. Default: 15' - - !ruby/object:Api::Type::String - name: version - description: 'Version of ACM installed' - !ruby/object:Api::Type::NestedObject name: policycontroller description: Policy Controller spec diff --git a/mmv1/third_party/terraform/services/gkehub2/resource_gke_hub_feature_test.go.erb b/mmv1/third_party/terraform/services/gkehub2/resource_gke_hub_feature_test.go.erb index f2c14b2d223f..5af1d572cfd7 100644 --- a/mmv1/third_party/terraform/services/gkehub2/resource_gke_hub_feature_test.go.erb +++ b/mmv1/third_party/terraform/services/gkehub2/resource_gke_hub_feature_test.go.erb @@ -460,6 +460,7 @@ resource "google_gke_hub_feature" "feature" { location = "global" fleet_default_member_config { configmanagement { + version = "1.16.0" config_sync { source_format = "hierarchy" git { @@ -486,6 +487,7 @@ resource "google_gke_hub_feature" "feature" { location = "global" fleet_default_member_config { configmanagement { + version = "1.16.1" config_sync { source_format = "unstructured" oci {