Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add validation.StringIsNotEmpty #12948

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .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`
```
10 changes: 6 additions & 4 deletions google/resource_dns_managed_zone.go
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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,
Expand Down