Skip to content

Commit f3e2e4d

Browse files
committed
Change suppress function for computed field
1 parent 2b0acb9 commit f3e2e4d

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
@@ -1871,7 +1862,7 @@ func ResourceContainerCluster() *schema.Resource {
18711862
Type: schema.TypeList,
18721863
MaxItems: 1,
18731864
Optional: true,
1874-
DiffSuppressFunc: suppressDiffForNetworkTierConfig,
1865+
Computed: true,
18751866
Description: `Used to determine the default network tier for external IP addresses on cluster resources, such as node pools and load balancers.`,
18761867
Elem: &schema.Resource{
18771868
Schema: map[string]*schema.Schema{

0 commit comments

Comments
 (0)