Skip to content

Commit

Permalink
Merge pull request #30739 from hashicorp/b-aws_dx_gateway-name-valida…
Browse files Browse the repository at this point in the history
…tion

r/aws_dx_gateway: Remove `name` argument validation
  • Loading branch information
ewbankkit authored Apr 14, 2023
2 parents e60ab1a + c13b109 commit 200488d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .changelog/30739.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_dx_gateway: Remove plan time validation from `name` argument
```
7 changes: 2 additions & 5 deletions internal/service/directconnect/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package directconnect
import (
"context"
"log"
"regexp"
"strconv"
"time"

Expand All @@ -12,7 +11,6 @@ import (
"github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2/tfawserr"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"github.com/hashicorp/terraform-provider-aws/internal/conns"
"github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag"
"github.com/hashicorp/terraform-provider-aws/internal/tfresource"
Expand All @@ -39,9 +37,8 @@ func ResourceGateway() *schema.Resource {
ValidateFunc: verify.ValidAmazonSideASN,
},
"name": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-z0-9-]{1,100}$`), "Name must contain no more than 100 characters. Valid characters are a-z, 0-9, and hyphens (–)."),
Type: schema.TypeString,
Required: true,
},
"owner_account_id": {
Type: schema.TypeString,
Expand Down

0 comments on commit 200488d

Please sign in to comment.