diff --git a/mmv1/third_party/terraform/services/container/resource_container_cluster.go.erb b/mmv1/third_party/terraform/services/container/resource_container_cluster.go.erb index 19b8c98d860b..998718fb29ec 100644 --- a/mmv1/third_party/terraform/services/container/resource_container_cluster.go.erb +++ b/mmv1/third_party/terraform/services/container/resource_container_cluster.go.erb @@ -1403,7 +1403,6 @@ func ResourceContainerCluster() *schema.Resource { "node_pool_defaults": clusterSchemaNodePoolDefaults(), -<% unless version == "ga" -%> "node_pool_auto_config": { Type: schema.TypeList, Optional: true, @@ -1431,7 +1430,6 @@ func ResourceContainerCluster() *schema.Resource { }, }, }, -<% end -%> "node_version": { Type: schema.TypeString, @@ -2182,8 +2180,8 @@ func resourceContainerClusterCreate(d *schema.ResourceData, meta interface{}) er NotificationConfig: expandNotificationConfig(d.Get("notification_config")), ConfidentialNodes: expandConfidentialNodes(d.Get("confidential_nodes")), ResourceLabels: tpgresource.ExpandStringMap(d, "resource_labels"), -<% unless version == 'ga' -%> NodePoolAutoConfig: expandNodePoolAutoConfig(d.Get("node_pool_auto_config")), +<% unless version == 'ga' -%> ProtectConfig: expandProtectConfig(d.Get("protect_config")), <% end -%> CostManagementConfig: expandCostManagementConfig(d.Get("cost_management_config")), @@ -2318,11 +2316,9 @@ func resourceContainerClusterCreate(d *schema.ResourceData, meta interface{}) er cluster.MonitoringConfig = expandMonitoringConfig(v) } -<% unless version == 'ga' -%> if err := validateNodePoolAutoConfig(cluster); err != nil { return err } -<% end -%> if err := validatePrivateClusterConfig(cluster); err != nil { return err @@ -2807,11 +2803,9 @@ func resourceContainerClusterRead(d *schema.ResourceData, meta interface{}) erro return err } -<% unless version == 'ga' -%> if err := d.Set("node_pool_auto_config", flattenNodePoolAutoConfig(cluster.NodePoolAutoConfig)); err != nil { return err } -<% end -%> if err := d.Set("node_pool_defaults", flattenNodePoolDefaults(cluster.NodePoolDefaults)); err != nil { return err @@ -4018,7 +4012,6 @@ func resourceContainerClusterUpdate(d *schema.ResourceData, meta interface{}) er log.Printf("[INFO] GKE cluster %s Security Posture Config has been updated to %#v", d.Id(), req.Update.DesiredSecurityPostureConfig) } -<% unless version == 'ga' -%> if d.HasChange("node_pool_auto_config.0.network_tags.0.tags") { tags := d.Get("node_pool_auto_config.0.network_tags.0.tags").([]interface{}) @@ -4039,7 +4032,6 @@ func resourceContainerClusterUpdate(d *schema.ResourceData, meta interface{}) er log.Printf("[INFO] GKE cluster %s node pool auto config network tags have been updated", d.Id()) } -<% end -%> d.Partial(false) @@ -5298,7 +5290,6 @@ func flattenNodePoolDefaults(c *container.NodePoolDefaults) []map[string]interfa return []map[string]interface{}{result} } -<% unless version == 'ga' -%> func expandNodePoolAutoConfig(configured interface{}) *container.NodePoolAutoConfig { l := configured.([]interface{}) if len(l) == 0 || l[0] == nil { @@ -5326,7 +5317,6 @@ func expandNodePoolAutoConfigNetworkTags(configured interface{}) *container.Netw } return nt } -<% end -%> func flattenNotificationConfig(c *container.NotificationConfig) []map[string]interface{} { if c == nil { @@ -6052,7 +6042,6 @@ func flattenManagedPrometheusConfig(c *container.ManagedPrometheusConfig) []map[ } } -<% unless version == 'ga' -%> func flattenNodePoolAutoConfig(c *container.NodePoolAutoConfig) []map[string]interface{} { if c == nil { return nil @@ -6077,7 +6066,6 @@ func flattenNodePoolAutoConfigNetworkTags(c *container.NetworkTags) []map[string } return []map[string]interface{}{result} } -<% end -%> func resourceContainerClusterStateImporter(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { config := meta.(*transport_tpg.Config) @@ -6301,7 +6289,6 @@ func BinaryAuthorizationDiffSuppress(k, old, new string, r *schema.ResourceData) return false } -<% unless version == 'ga' -%> func validateNodePoolAutoConfig(cluster *container.Cluster) error { if cluster == nil || cluster.NodePoolAutoConfig == nil { return nil @@ -6314,7 +6301,6 @@ func validateNodePoolAutoConfig(cluster *container.Cluster) error { return nil } -<% end -%> func containerClusterSurgeSettingsCustomizeDiff(_ context.Context, d *schema.ResourceDiff, meta interface{}) error { if v, ok := d.GetOk("cluster_autoscaling.0.auto_provisioning_defaults.0.upgrade_settings.0.strategy"); ok { diff --git a/mmv1/third_party/terraform/services/container/resource_container_cluster_test.go.erb b/mmv1/third_party/terraform/services/container/resource_container_cluster_test.go.erb index 91f4c3b4e3ea..fc9635d20137 100644 --- a/mmv1/third_party/terraform/services/container/resource_container_cluster_test.go.erb +++ b/mmv1/third_party/terraform/services/container/resource_container_cluster_test.go.erb @@ -2521,7 +2521,6 @@ func TestAccContainerCluster_autoprovisioningDefaultsUpgradeSettings(t *testing. }) } -<% unless version == 'ga' -%> func TestAccContainerCluster_nodeAutoprovisioningNetworkTags(t *testing.T) { t.Parallel() @@ -2548,7 +2547,6 @@ func TestAccContainerCluster_nodeAutoprovisioningNetworkTags(t *testing.T) { }, }) } -<% end -%> func TestAccContainerCluster_withShieldedNodes(t *testing.T) { t.Parallel() @@ -2660,7 +2658,6 @@ func TestAccContainerCluster_errorAutopilotLocation(t *testing.T) { }) } -<% unless version == 'ga' -%> func TestAccContainerCluster_withAutopilotNetworkTags(t *testing.T) { t.Parallel() @@ -2685,7 +2682,6 @@ func TestAccContainerCluster_withAutopilotNetworkTags(t *testing.T) { }, }) } -<% end -%> func TestAccContainerCluster_withWorkloadIdentityConfig(t *testing.T) { t.Parallel() diff --git a/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown b/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown index e5eb29fe4011..106310d7c59d 100644 --- a/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown +++ b/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown @@ -268,7 +268,7 @@ region are guaranteed to support the same version. to say "these are the _only_ node pools associated with this cluster", use the [google_container_node_pool](container_node_pool.html) resource instead of this property. -* `node_pool_auto_config` - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) Node pool configs that apply to auto-provisioned node pools in +* `node_pool_auto_config` - (Optional) Node pool configs that apply to auto-provisioned node pools in [autopilot](https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview#comparison) clusters and [node auto-provisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning)-enabled clusters. Structure is [documented below](#nested_node_pool_auto_config). @@ -1019,11 +1019,11 @@ workload_identity_config { The `node_pool_auto_config` block supports: -* `network_tags` (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) - The network tag config for the cluster's automatically provisioned node pools. +* `network_tags` (Optional) - The network tag config for the cluster's automatically provisioned node pools. The `network_tags` block supports: -* `tags` (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) - List of network tags applied to auto-provisioned node pools. +* `tags` (Optional) - List of network tags applied to auto-provisioned node pools. ```hcl node_pool_auto_config {