From 210f17525bde98d9eaed55915d7ba35b639d32fe Mon Sep 17 00:00:00 2001 From: askubis Date: Fri, 16 Feb 2024 15:53:39 +0100 Subject: [PATCH] additional fixes for stateful ips (#9965) --- .../compute/resource_compute_instance_group_manager.go.erb | 7 ------- .../resource_compute_region_instance_group_manager.go.erb | 7 ------- ...ource_compute_region_instance_group_manager_test.go.erb | 2 -- 3 files changed, 16 deletions(-) diff --git a/mmv1/third_party/terraform/services/compute/resource_compute_instance_group_manager.go.erb b/mmv1/third_party/terraform/services/compute/resource_compute_instance_group_manager.go.erb index 3dc61dfc1d17..d61f2457be99 100644 --- a/mmv1/third_party/terraform/services/compute/resource_compute_instance_group_manager.go.erb +++ b/mmv1/third_party/terraform/services/compute/resource_compute_instance_group_manager.go.erb @@ -904,17 +904,10 @@ func resourceComputeInstanceGroupManagerUpdate(d *schema.ResourceData, meta inte } <% end -%> - <% unless version == "ga" -%> if d.HasChange("stateful_internal_ip") || d.HasChange("stateful_external_ip") || d.HasChange("stateful_disk") { updatedManager.StatefulPolicy = expandStatefulPolicy(d) change = true } - <% else -%> - if d.HasChange("stateful_disk") { - updatedManager.StatefulPolicy = expandStatefulPolicy(d) - change = true - } - <% end -%> if d.HasChange("list_managed_instances_results") { updatedManager.ListManagedInstancesResults = d.Get("list_managed_instances_results").(string) diff --git a/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager.go.erb b/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager.go.erb index 871dd0314275..8530b1e3e6b5 100644 --- a/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager.go.erb +++ b/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager.go.erb @@ -847,17 +847,10 @@ func resourceComputeRegionInstanceGroupManagerUpdate(d *schema.ResourceData, met change = true } - <% unless version == "ga" -%> if d.HasChange("stateful_internal_ip") || d.HasChange("stateful_external_ip") || d.HasChange("stateful_disk") { updatedManager.StatefulPolicy = expandStatefulPolicy(d) change = true } - <% else -%> - if d.HasChange("stateful_disk") { - updatedManager.StatefulPolicy = expandStatefulPolicy(d) - change = true - } - <% end -%> <% unless version == "ga" -%> if d.HasChange("all_instances_config") { diff --git a/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager_test.go.erb b/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager_test.go.erb index 85416a6ebdcb..a5470d09b032 100644 --- a/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager_test.go.erb +++ b/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager_test.go.erb @@ -323,8 +323,6 @@ func TestAccRegionInstanceGroupManager_distributionPolicy(t *testing.T) { } func TestAccRegionInstanceGroupManager_stateful(t *testing.T) { - // TODO: Flaky test due to ordering of IPs https://github.com/hashicorp/terraform-provider-google/issues/13430 - t.Skip() t.Parallel() template := fmt.Sprintf("tf-test-rigm-%s", acctest.RandString(t, 10))