Skip to content

Commit

Permalink
Merge pull request hashicorp#32715 from ponkio-o/b-aws_account_primar…
Browse files Browse the repository at this point in the history
…y_contact-validatefunc

r/aws_account_primary_contact: fix validation of phone_number
  • Loading branch information
ewbankkit authored Jul 27, 2023
2 parents 3004b33 + 1f61386 commit 00e4286
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/32715.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_account_primary_contact: Correct plan-time validation of `phone_number`
```
2 changes: 1 addition & 1 deletion internal/service/account/primary_contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func resourcePrimaryContact() *schema.Resource {
"phone_number": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[\s0-9()+-]+$`), "must be a valid phone number"),
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[+][\s0-9()-]+$`), "must be a valid phone number"),
},
"postal_code": {
Type: schema.TypeString,
Expand Down

0 comments on commit 00e4286

Please sign in to comment.