diff --git a/.changelog/6753.txt b/.changelog/6753.txt new file mode 100644 index 00000000000..a6b1d671994 --- /dev/null +++ b/.changelog/6753.txt @@ -0,0 +1,3 @@ +```release-note:bug +dns: fixed apply failure when `description` is set to empty string on `google_dns_managed_zone` +``` diff --git a/google/resource_dns_managed_zone.go b/google/resource_dns_managed_zone.go index 8c256710870..b1c52a02a9f 100644 --- a/google/resource_dns_managed_zone.go +++ b/google/resource_dns_managed_zone.go @@ -23,6 +23,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "google.golang.org/api/dns/v1" ) @@ -74,10 +75,11 @@ Must be unique within the project.`, }, }, "description": { - Type: schema.TypeString, - Optional: true, - Description: `A textual description field. Defaults to 'Managed by Terraform'.`, - Default: "Managed by Terraform", + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringIsNotEmpty, + Description: `A textual description field. Defaults to 'Managed by Terraform'.`, + Default: "Managed by Terraform", }, "dnssec_config": { Type: schema.TypeList,