Skip to content

Commit 78ad34e

Browse files
(GA) support for SM-GKE Auto rotation (#15040)
1 parent 2dab011 commit 78ad34e

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

mmv1/third_party/terraform/services/container/resource_container_cluster.go.tmpl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,7 +1678,6 @@ func ResourceContainerCluster() *schema.Resource {
16781678
Required: true,
16791679
Description: `Enable the Secret manager csi component.`,
16801680
},
1681-
{{- if ne $.TargetVersionName "ga" }}
16821681
"rotation_config" : {
16831682
Type: schema.TypeList,
16841683
Optional: true,
@@ -1701,7 +1700,6 @@ func ResourceContainerCluster() *schema.Resource {
17011700
},
17021701
},
17031702
},
1704-
{{- end }}
17051703
},
17061704
},
17071705
},
@@ -6408,7 +6406,6 @@ func expandSecretManagerConfig(configured interface{}) *container.SecretManagerC
64086406
Enabled: config["enabled"].(bool),
64096407
ForceSendFields: []string{"Enabled"},
64106408
}
6411-
{{- if ne $.TargetVersionName "ga" }}
64126409
if autoRotation, ok := config["rotation_config"]; ok {
64136410
if autoRotationList, ok := autoRotation.([]interface{}); ok {
64146411
if len(autoRotationList) > 0 {
@@ -6426,7 +6423,6 @@ func expandSecretManagerConfig(configured interface{}) *container.SecretManagerC
64266423
}
64276424
}
64286425
}
6429-
{{- end }}
64306426
return sc
64316427
}
64326428

@@ -7485,7 +7481,6 @@ func flattenSecretManagerConfig(c *container.SecretManagerConfig) []map[string]i
74857481

74867482
result["enabled"] = c.Enabled
74877483

7488-
{{- if ne $.TargetVersionName "ga" }}
74897484
rotationList := []map[string]interface{}{}
74907485
if c.RotationConfig != nil {
74917486
rotationConfigMap := map[string]interface{}{
@@ -7497,7 +7492,6 @@ func flattenSecretManagerConfig(c *container.SecretManagerConfig) []map[string]i
74977492
rotationList = append(rotationList, rotationConfigMap)
74987493
}
74997494
result["rotation_config"] = rotationList
7500-
{{- end }}
75017495
return []map[string]interface{}{result}
75027496
}
75037497

mmv1/third_party/terraform/services/container/resource_container_cluster_test.go.tmpl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11713,12 +11713,10 @@ resource "google_container_cluster" "primary" {
1171311713
initial_node_count = 1
1171411714
secret_manager_config {
1171511715
enabled = true
11716-
{{- if ne $.TargetVersionName "ga" }}
1171711716
rotation_config {
1171811717
enabled = true
1171911718
rotation_interval = "300s"
1172011719
}
11721-
{{- end }}
1172211720
}
1172311721
deletion_protection = false
1172411722
network = "%s"
@@ -11741,12 +11739,10 @@ resource "google_container_cluster" "primary" {
1174111739
initial_node_count = 1
1174211740
secret_manager_config {
1174311741
enabled = true
11744-
{{- if ne $.TargetVersionName "ga" }}
1174511742
rotation_config {
1174611743
enabled = true
1174711744
rotation_interval = "120s"
1174811745
}
11749-
{{- end }}
1175011746
}
1175111747
deletion_protection = false
1175211748
network = "%s"
@@ -11769,12 +11765,10 @@ resource "google_container_cluster" "primary" {
1176911765
initial_node_count = 1
1177011766
secret_manager_config {
1177111767
enabled = true
11772-
{{- if ne $.TargetVersionName "ga" }}
1177311768
rotation_config {
1177411769
enabled = false
1177511770
rotation_interval = "120s"
1177611771
}
11777-
{{- end }}
1177811772
}
1177911773
deletion_protection = false
1178011774
network = "%s"

mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ notification_config {
12851285
<a name="nested_secret_manager_config"></a>The `secret_manager_config` block supports:
12861286

12871287
* `enabled` (Required) - Enable the Secret Manager add-on for this cluster.
1288-
* `rotation_config` (Optional, Beta) - config for secret manager auto rotation. Structure is [docuemented below](#rotation_config)
1288+
* `rotation_config` (Optional) - config for secret manager auto rotation. Structure is [docuemented below](#rotation_config)
12891289

12901290
<a name="rotation_config"></a>The `rotation_config` block supports:
12911291

0 commit comments

Comments
 (0)