Skip to content

Commit 82c1202

Browse files
committed
Change suppress function for computed field
1 parent 6273a8e commit 82c1202

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,6 @@ var (
152152
}
153153
return false
154154
})
155-
156-
suppressDiffForNetworkTierConfig = schema.SchemaDiffSuppressFunc(func(k, oldValue, newValue string, d *schema.ResourceData) bool {
157-
if k == "ip_allocation_policy.0.network_tier_config.#" && oldValue == "1" && newValue == "0" {
158-
if v, _ := d.Get("ip_allocation_policy.0.network_tier_config.0.network_tier").(string); v == "NETWORK_TIER_DEFAULT" || v == "" {
159-
return true
160-
}
161-
}
162-
return false
163-
})
164155
)
165156

166157
// Defines default nodel pool settings for the entire cluster. These settings are
@@ -1887,7 +1878,7 @@ func ResourceContainerCluster() *schema.Resource {
18871878
Type: schema.TypeList,
18881879
MaxItems: 1,
18891880
Optional: true,
1890-
DiffSuppressFunc: suppressDiffForNetworkTierConfig,
1881+
Computed: true,
18911882
Description: `Used to determine the default network tier for external IP addresses on cluster resources, such as node pools and load balancers.`,
18921883
Elem: &schema.Resource{
18931884
Schema: map[string]*schema.Schema{

0 commit comments

Comments
 (0)