|
| 1 | +# Upgrading to v36.0 |
| 2 | +The v36.0 release of *kubernetes-engine* is a backwards incompatible release. |
| 3 | + |
| 4 | +### ACM Sub-Module Removal |
| 5 | +The ACM Sub-Module has been removed in v36.0. Please use the [google_gke_hub_feature](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/gke_hub_feature#example-usage---enable-fleet-default-member-config-configmanagement) and [google_gke_hub_feature_membership](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/gke_hub_feature_membership#example-usage---config-management-with-git) resources. For additional examples, see [terraform-docs-samples/gke/autopilot/config_sync](https://github.com/terraform-google-modules/terraform-docs-samples/tree/main/gke/autopilot/basic) and [terraform-docs-samples/gke/autopilot/policycontroller](https://github.com/terraform-google-modules/terraform-docs-samples/tree/main/gke/autopilot/policycontroller). |
| 6 | + |
| 7 | + |
| 8 | +```diff |
| 9 | +-module "acm" { |
| 10 | +- source = "terraform-google-modules/kubernetes-engine/google//modules/acm" |
| 11 | +- version = "~> 35.0" |
| 12 | +- project_id = var.project_id |
| 13 | +- location = module.gke.location |
| 14 | +- cluster_name = module.gke.name |
| 15 | + |
| 16 | +- # Config Sync |
| 17 | +- enable_config_sync = true |
| 18 | +- sync_repo = "[email protected]:GoogleCloudPlatform/anthos-config-management-samples.git" |
| 19 | +- sync_branch = "1.0.0" |
| 20 | +- policy_dir = "foo-corp" |
| 21 | + |
| 22 | +- # Policy Controller |
| 23 | +- enable_policy_controller = true |
| 24 | +- enable_fleet_feature = true |
| 25 | +- install_template_library = true |
| 26 | +- enable_referential_rules = true |
| 27 | +- policy_bundles = ["https://github.com/GoogleCloudPlatform/acm-policy-controller-library.git/bundles/pss-baseline-v2022"] |
| 28 | +-} |
| 29 | + |
| 30 | +# Config Sync |
| 31 | ++resource "google_gke_hub_feature" "config_feature" { |
| 32 | ++ project = var.project_id |
| 33 | ++ location = "global" |
| 34 | ++ name = "servicemesh" |
| 35 | ++} |
| 36 | + |
| 37 | ++resource "google_gke_hub_feature_membership" "config_feature_membership" { |
| 38 | ++ project = var.project_id |
| 39 | ++ location = "global" |
| 40 | + |
| 41 | ++ feature = google_gke_hub_feature.config_feature.name |
| 42 | ++ membership = module.gke.fleet_membership |
| 43 | ++ membership_location = module.gke.region |
| 44 | + |
| 45 | ++ configmanagement { |
| 46 | ++ config_sync { |
| 47 | ++ enabled = true |
| 48 | ++ git { |
| 49 | ++ sync_repo = "[email protected]:GoogleCloudPlatform/anthos-config-management-samples.git" |
| 50 | ++ sync_branch = "1.0.0" |
| 51 | ++ policy_dir = "foo-corp" |
| 52 | ++ } |
| 53 | ++ } |
| 54 | ++ } |
| 55 | ++} |
| 56 | + |
| 57 | +# Policy Controller |
| 58 | ++resource "google_gke_hub_feature" "poco_feature" { |
| 59 | ++ name = "policycontroller" |
| 60 | ++ project = var.project_id |
| 61 | ++ location = "global" |
| 62 | ++} |
| 63 | ++ |
| 64 | ++resource "google_gke_hub_feature_membership" "poco_feature_membership" { |
| 65 | ++ project = var.project_id |
| 66 | ++ location = "global" |
| 67 | ++ |
| 68 | ++ feature = google_gke_hub_feature.poco_feature.name |
| 69 | ++ membership = module.gke.fleet_membership |
| 70 | ++ membership_location = module.gke.region |
| 71 | ++ |
| 72 | ++ policycontroller { |
| 73 | ++ policy_controller_hub_config { |
| 74 | ++ install_spec = "INSTALL_SPEC_ENABLED" |
| 75 | ++ policy_content { |
| 76 | ++ template_library { |
| 77 | ++ installation = "ALL" |
| 78 | ++ } |
| 79 | ++ bundles { |
| 80 | ++ bundle_name = "pss-baseline-v2022" |
| 81 | ++ } |
| 82 | ++ } |
| 83 | ++ referential_rules_enabled = true |
| 84 | ++ } |
| 85 | ++ } |
| 86 | ++} |
| 87 | +``` |
0 commit comments