Skip to content

Commit

Permalink
Merge pull request #20842 from kamilturek/b-imagebuilder-name-validat…
Browse files Browse the repository at this point in the history
…ion-error

Improve message of name validation error
  • Loading branch information
ewbankkit authored Sep 11, 2021
2 parents 8e18929 + eeb894f commit 9314968
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/20842.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_imagebuilder_distribution_configuration: Improve validation error message of `name` argument
```
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func resourceAwsImageBuilderDistributionConfiguration() *schema.Resource {
Optional: true,
ValidateFunc: validation.All(
validation.StringLenBetween(0, 127),
validation.StringMatch(regexp.MustCompile(`^[-_A-Za-z0-9{][-_A-Za-z0-9\s:{}]+[-_A-Za-z0-9}]$`), "must contain only alphanumeric characters, periods, underscores, and hyphens"),
validation.StringMatch(regexp.MustCompile(`^[-_A-Za-z0-9{][-_A-Za-z0-9\s:{}]+[-_A-Za-z0-9}]$`), "must contain only alphanumeric characters, underscores, and hyphens"),
),
},
"target_account_ids": {
Expand Down

0 comments on commit 9314968

Please sign in to comment.