diff --git a/templates/terraform/post_create/compute_backend_service_security_policy.go.erb b/templates/terraform/post_create/compute_backend_service_security_policy.go.erb index f918fd881bea..7433b6bb7b40 100644 --- a/templates/terraform/post_create/compute_backend_service_security_policy.go.erb +++ b/templates/terraform/post_create/compute_backend_service_security_policy.go.erb @@ -1,6 +1,6 @@ // security_policy isn't set by Create / Update -if v, ok := d.GetOk("security_policy"); ok { - pol, err := ParseSecurityPolicyFieldValue(v.(string), d, config) +if o, n := d.GetChange("security_policy"); o.(string) != n.(string) { + pol, err := ParseSecurityPolicyFieldValue(n.(string), d, config) if err != nil { return errwrap.Wrapf("Error parsing Backend Service security policy: {{err}}", err) }