From 5e3a185ac6e30608076484c209f7e192a2549c3d Mon Sep 17 00:00:00 2001 From: venky kuberan Date: Mon, 29 Mar 2021 15:47:07 -0700 Subject: [PATCH 1/2] deprecated existing beta fields in TPG --- ...r.go => resource_compute_instance_group_manager.go.erb} | 4 ++++ ... resource_compute_region_instance_group_manager.go.erb} | 7 +++++++ .../terraform/resources/resource_container_cluster.go.erb | 3 +++ 3 files changed, 14 insertions(+) rename mmv1/third_party/terraform/resources/{resource_compute_instance_group_manager.go => resource_compute_instance_group_manager.go.erb} (99%) rename mmv1/third_party/terraform/resources/{resource_compute_region_instance_group_manager.go => resource_compute_region_instance_group_manager.go.erb} (99%) diff --git a/mmv1/third_party/terraform/resources/resource_compute_instance_group_manager.go b/mmv1/third_party/terraform/resources/resource_compute_instance_group_manager.go.erb similarity index 99% rename from mmv1/third_party/terraform/resources/resource_compute_instance_group_manager.go rename to mmv1/third_party/terraform/resources/resource_compute_instance_group_manager.go.erb index 47d0f148b645..bcfcd77a90ce 100644 --- a/mmv1/third_party/terraform/resources/resource_compute_instance_group_manager.go +++ b/mmv1/third_party/terraform/resources/resource_compute_instance_group_manager.go.erb @@ -1,3 +1,4 @@ +<% autogen_exception -%> package google import ( @@ -251,6 +252,9 @@ func resourceComputeInstanceGroupManager() *schema.Resource { Optional: true, ValidateFunc: validation.IntBetween(0, 3600), Description: `Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].`, + <% if version == "ga" -%> + Deprecated: `This is beta only attribute`, + <% end -%> }, "replacement_method": { Type: schema.TypeString, diff --git a/mmv1/third_party/terraform/resources/resource_compute_region_instance_group_manager.go b/mmv1/third_party/terraform/resources/resource_compute_region_instance_group_manager.go.erb similarity index 99% rename from mmv1/third_party/terraform/resources/resource_compute_region_instance_group_manager.go rename to mmv1/third_party/terraform/resources/resource_compute_region_instance_group_manager.go.erb index f8daab1452be..28023c1faa1c 100644 --- a/mmv1/third_party/terraform/resources/resource_compute_region_instance_group_manager.go +++ b/mmv1/third_party/terraform/resources/resource_compute_region_instance_group_manager.go.erb @@ -1,3 +1,4 @@ +<% autogen_exception -%> package google import ( @@ -219,6 +220,9 @@ func resourceComputeRegionInstanceGroupManager() *schema.Resource { ForceNew: true, Computed: true, Description: `The shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType).`, + <% if version == "ga" -%> + Deprecated: `This is beta only attribute`, + <% end -%> }, "update_policy": { @@ -280,6 +284,9 @@ func resourceComputeRegionInstanceGroupManager() *schema.Resource { Optional: true, ValidateFunc: validation.IntBetween(0, 3600), Description: `Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].`, + <% if version == "ga" -%> + Deprecated: `This is beta only attribute`, + <% end -%> }, "instance_redistribution_type": { Type: schema.TypeString, diff --git a/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb b/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb index 084152023d93..864292a41836 100644 --- a/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb +++ b/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb @@ -825,6 +825,9 @@ func resourceContainerCluster() *schema.Resource { Optional: true, MaxItems: 1, Description: `Configuration for the PodSecurityPolicy feature.`, +<% if version == "ga" -%> + Deprecated: `This is beta only attribute`, +<% end -%> Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "enabled": { From 677a94071422a77a352186480f436fd4b028fbfd Mon Sep 17 00:00:00 2001 From: venky kuberan Date: Sun, 11 Apr 2021 21:17:20 -0700 Subject: [PATCH 2/2] description updated for deprecated attributes for google provider --- .../resources/resource_compute_instance_group_manager.go.erb | 2 +- .../resource_compute_region_instance_group_manager.go.erb | 4 ++-- .../terraform/resources/resource_container_cluster.go.erb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mmv1/third_party/terraform/resources/resource_compute_instance_group_manager.go.erb b/mmv1/third_party/terraform/resources/resource_compute_instance_group_manager.go.erb index bcfcd77a90ce..8f753acf161d 100644 --- a/mmv1/third_party/terraform/resources/resource_compute_instance_group_manager.go.erb +++ b/mmv1/third_party/terraform/resources/resource_compute_instance_group_manager.go.erb @@ -253,7 +253,7 @@ func resourceComputeInstanceGroupManager() *schema.Resource { ValidateFunc: validation.IntBetween(0, 3600), Description: `Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].`, <% if version == "ga" -%> - Deprecated: `This is beta only attribute`, + Deprecated: `This attribute is currently in beta and will be removed from the google provider. Please use the google-beta provider to continue using this attribute.`, <% end -%> }, "replacement_method": { diff --git a/mmv1/third_party/terraform/resources/resource_compute_region_instance_group_manager.go.erb b/mmv1/third_party/terraform/resources/resource_compute_region_instance_group_manager.go.erb index 28023c1faa1c..7256bbcd792c 100644 --- a/mmv1/third_party/terraform/resources/resource_compute_region_instance_group_manager.go.erb +++ b/mmv1/third_party/terraform/resources/resource_compute_region_instance_group_manager.go.erb @@ -221,7 +221,7 @@ func resourceComputeRegionInstanceGroupManager() *schema.Resource { Computed: true, Description: `The shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType).`, <% if version == "ga" -%> - Deprecated: `This is beta only attribute`, + Deprecated: `This attribute is currently in beta and will be removed from the google provider. Please use the google-beta provider to continue using this attribute.`, <% end -%> }, @@ -285,7 +285,7 @@ func resourceComputeRegionInstanceGroupManager() *schema.Resource { ValidateFunc: validation.IntBetween(0, 3600), Description: `Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].`, <% if version == "ga" -%> - Deprecated: `This is beta only attribute`, + Deprecated: `This attribute is currently in beta and will be removed from the google provider. Please use the google-beta provider to continue using this attribute.`, <% end -%> }, "instance_redistribution_type": { diff --git a/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb b/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb index 864292a41836..a1abdf2a1c71 100644 --- a/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb +++ b/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb @@ -826,7 +826,7 @@ func resourceContainerCluster() *schema.Resource { MaxItems: 1, Description: `Configuration for the PodSecurityPolicy feature.`, <% if version == "ga" -%> - Deprecated: `This is beta only attribute`, + Deprecated: `This attribute is currently in beta and will be removed from the google provider. Please use the google-beta provider to continue using this attribute.`, <% end -%> Elem: &schema.Resource{ Schema: map[string]*schema.Schema{