Skip to content
New issue

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

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

Already on GitHub? # to your account

Add validation for route53 zone schema #12340

Merged
merged 2 commits into from
Jan 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions aws/resource_aws_route53_zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ func resourceAwsRoute53Zone() *schema.Resource {
// returned from API, no longer requiring custom DiffSuppressFunc;
// instead a StateFunc allows input to be provided
// with or without the trailing period
Type: schema.TypeString,
Required: true,
ForceNew: true,
StateFunc: trimTrailingPeriod,
Type: schema.TypeString,
Required: true,
ForceNew: true,
StateFunc: trimTrailingPeriod,
ValidateFunc: validation.StringLenBetween(1, 1024),
},

"comment": {
Expand Down Expand Up @@ -77,6 +78,7 @@ func resourceAwsRoute53Zone() *schema.Resource {
Optional: true,
ForceNew: true,
ConflictsWith: []string{"vpc"},
ValidateFunc: validation.StringLenBetween(0, 32),
},

"name_servers": {
Expand Down