Skip to content

Commit dbf47b2

Browse files
committed
fixes
1 parent f0bf7be commit dbf47b2

File tree

4 files changed

+10
-33
lines changed

4 files changed

+10
-33
lines changed

gke/enterprise/config_sync/git/main.tf

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,6 @@
1515
*/
1616

1717
# [START gke_enterprise_config_sync_git]
18-
data "google_project" "default" {}
19-
20-
resource "google_container_cluster" "default" {
21-
name = "gke-autopilot-basic"
22-
location = "us-central1"
23-
24-
fleet {
25-
project = data.google_project.default.project_id
26-
}
27-
28-
enable_autopilot = true
29-
30-
# Set `deletion_protection` to `true` will ensure that one cannot
31-
# accidentally delete this instance by use of Terraform.
32-
deletion_protection = false
33-
}
34-
3518
resource "google_gke_hub_feature" "default" {
3619
name = "configmanagement"
3720
location = "global"

gke/enterprise/config_sync/git/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Google LLC
1+
# Copyright 2024-2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

gke/enterprise/config_sync/oci/main.tf

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,13 @@
1515
*/
1616

1717
# [START gke_enterprise_config_sync_oci]
18-
data "google_project" "default" {}
18+
resource "google_project_service" "default" {
19+
for_each = toset([
20+
"meshconfig.googleapis.com"
21+
])
1922

20-
resource "google_container_cluster" "default" {
21-
name = "gke-autopilot-basic"
22-
location = "us-central1"
23-
24-
fleet {
25-
project = data.google_project.default.project_id
26-
}
27-
28-
enable_autopilot = true
29-
30-
# Set `deletion_protection` to `true` will ensure that one cannot
31-
# accidentally delete this instance by use of Terraform.
32-
deletion_protection = false
23+
service = each.value
24+
disable_on_destroy = false
3325
}
3426

3527
resource "google_gke_hub_feature" "configmanagement_feature_member" {
@@ -50,5 +42,7 @@ resource "google_gke_hub_feature" "configmanagement_feature_member" {
5042
}
5143
}
5244
}
45+
46+
depends_on = [google_project_service.default]
5347
}
5448
# [END gke_enterprise_config_sync_oci]

gke/enterprise/config_sync/oci/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Google LLC
1+
# Copyright 2024-2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)