Skip to content

Commit

Permalink
Merge pull request #29264 from cageyv/main
Browse files Browse the repository at this point in the history
imagebuilder component validate.go: accountIDRegexp add third-party
  • Loading branch information
jar-b authored Feb 10, 2023
2 parents e7d049e + fe76d14 commit 2f578b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/verify/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)

var accountIDRegexp = regexp.MustCompile(`^(aws|aws-managed|\d{12})$`)
var accountIDRegexp = regexp.MustCompile(`^(aws|aws-managed|third-party|\d{12})$`)
var partitionRegexp = regexp.MustCompile(`^aws(-[a-z]+)*$`)
var regionRegexp = regexp.MustCompile(`^[a-z]{2}(-[a-z]+)+-\d$`)

Expand Down
1 change: 1 addition & 0 deletions internal/verify/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ func TestValidARN(t *testing.T) {
"arn:aws:elasticbeanstalk:us-east-1:123456789012:environment/My App/MyEnvironment", // lintignore:AWSAT003,AWSAT005 // Beanstalk
"arn:aws:iam::123456789012:user/David", // lintignore:AWSAT005 // IAM User
"arn:aws:iam::aws:policy/CloudWatchReadOnlyAccess", // lintignore:AWSAT005 // Managed IAM policy
"arn:aws:imagebuilder:us-east-1:third-party:component/my-component", // lintignore:AWSAT003,AWSAT005 // ImageBuilder Third Party
"arn:aws:rds:eu-west-1:123456789012:db:mysql-db", // lintignore:AWSAT003,AWSAT005 // RDS
"arn:aws:s3:::my_corporate_bucket/exampleobject.png", // lintignore:AWSAT005 // S3 object
"arn:aws:events:us-east-1:319201112229:rule/rule_name", // lintignore:AWSAT003,AWSAT005 // CloudWatch Rule
Expand Down

0 comments on commit 2f578b5

Please sign in to comment.