Skip to content

Commit 6734dc7

Browse files
authored
feat!: remove ACM sub-module (#2236)
1 parent 010e034 commit 6734dc7

30 files changed

+85
-1854
lines changed

Diff for: build/int.cloudbuild.yaml

-15
Original file line numberDiff line numberDiff line change
@@ -164,21 +164,6 @@ steps:
164164
- verify simple-regional-with-networking-local
165165
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
166166
args: ['/bin/bash', '-c', 'cft test run TestSimpleRegionalWithNetworking --stage teardown --verbose']
167-
- id: apply simple-zonal-local
168-
waitFor:
169-
- init-all
170-
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
171-
args: ['/bin/bash', '-c', 'cft test run TestSimpleZonal --stage apply --verbose']
172-
- id: verify simple-zonal-local
173-
waitFor:
174-
- apply simple-zonal-local
175-
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
176-
args: ['/bin/bash', '-c', 'cft test run TestSimpleZonal --stage verify --verbose']
177-
- id: teardown simple-zonal-local
178-
waitFor:
179-
- verify simple-zonal-local
180-
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
181-
args: ['/bin/bash', '-c', 'cft test run TestSimpleZonal --stage teardown --verbose']
182167
- id: apply simple-zonal-private-local
183168
waitFor:
184169
- init-all

Diff for: docs/upgrading_to_v36.0.md

+85
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,91 @@ The variable `logging_variant` has been removed from the Autopilot sub-modules.
2525
}
2626
```
2727

28+
### ACM Sub-Module Removal
29+
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/config_sync) and [terraform-docs-samples/gke/autopilot/policycontroller](https://github.com/terraform-google-modules/terraform-docs-samples/tree/main/gke/autopilot/policycontroller).
30+
31+
32+
```diff
33+
-module "acm" {
34+
- source = "terraform-google-modules/kubernetes-engine/google//modules/acm"
35+
- version = "~> 35.0"
36+
- project_id = var.project_id
37+
- location = module.gke.location
38+
- cluster_name = module.gke.name
39+
40+
- # Config Sync
41+
- enable_config_sync = true
42+
- sync_repo = "git@github.com:GoogleCloudPlatform/anthos-config-management-samples.git"
43+
- sync_branch = "main"
44+
- policy_dir = "foo-corp"
45+
46+
- # Policy Controller
47+
- enable_policy_controller = true
48+
- enable_fleet_feature = true
49+
- install_template_library = true
50+
- enable_referential_rules = true
51+
- policy_bundles = ["https://github.com/GoogleCloudPlatform/acm-policy-controller-library.git/bundles/pss-baseline-v2022"]
52+
-}
53+
54+
# Config Sync
55+
+resource "google_gke_hub_feature" "config_feature" {
56+
+ project = var.project_id
57+
+ location = "global"
58+
+ name = "configmanagement"
59+
+}
60+
61+
+resource "google_gke_hub_feature_membership" "config_feature_membership" {
62+
+ project = var.project_id
63+
+ location = "global"
64+
65+
+ feature = google_gke_hub_feature.config_feature.name
66+
+ membership = module.gke.fleet_membership
67+
+ membership_location = module.gke.region
68+
69+
+ configmanagement {
70+
+ config_sync {
71+
+ enabled = true
72+
+ git {
73+
+ sync_repo = "git@github.com:GoogleCloudPlatform/anthos-config-management-samples.git"
74+
+ sync_branch = "main"
75+
+ policy_dir = "foo-corp"
76+
+ }
77+
+ }
78+
+ }
79+
+}
80+
81+
# Policy Controller
82+
+resource "google_gke_hub_feature" "poco_feature" {
83+
+ project = var.project_id
84+
+ location = "global"
85+
+ name = "policycontroller"
86+
+}
87+
+
88+
+resource "google_gke_hub_feature_membership" "poco_feature_membership" {
89+
+ project = var.project_id
90+
+ location = "global"
91+
+
92+
+ feature = google_gke_hub_feature.poco_feature.name
93+
+ membership = module.gke.fleet_membership
94+
+ membership_location = module.gke.region
95+
+
96+
+ policycontroller {
97+
+ policy_controller_hub_config {
98+
+ install_spec = "INSTALL_SPEC_ENABLED"
99+
+ policy_content {
100+
+ template_library {
101+
+ installation = "ALL"
102+
+ }
103+
+ bundles {
104+
+ bundle_name = "pss-baseline-v2022"
105+
+ }
106+
+ }
107+
+ referential_rules_enabled = true
108+
+ }
109+
+ }
110+
+}
111+
```
112+
28113
### ASM Sub-Module Removal
29114
The ASM 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-service-mesh) and [google_gke_hub_feature_membership](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/gke_hub_feature_membership#example-usage---service-mesh) resources. For another example, see [terraform-docs-samples/gke/autopilot
30115
/mesh](https://github.com/terraform-google-modules/terraform-docs-samples/tree/main/gke/autopilot/mesh).

Diff for: examples/simple_zonal_with_acm/README.md

-67
This file was deleted.

Diff for: examples/simple_zonal_with_acm/acm.tf

-36
This file was deleted.

Diff for: examples/simple_zonal_with_acm/main.tf

-61
This file was deleted.

Diff for: examples/simple_zonal_with_acm/network.tf

-45
This file was deleted.

0 commit comments

Comments
 (0)