Skip to content

Commit

Permalink
chore(GROW-2289): Update AWS region regex (#1325)
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-stewart authored Jul 13, 2023
1 parent c25e83a commit 0269d02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/cmd/generate_aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var (
// AwsArnRegex original source: https://regex101.com/r/pOfxYN/1
AwsArnRegex = `^arn:(?P<Partition>[^:\n]*):(?P<Service>[^:\n]*):(?P<Region>[^:\n]*):(?P<AccountID>[^:\n]*):(?P<Ignore>(?P<ResourceType>[^:\/\n]*)[:\/])?(?P<Resource>.*)$` //nolint
// AwsRegionRegex regex used for validating region input; note intentionally does not match gov cloud
AwsRegionRegex = `(us|ap|ca|eu|sa)-(central|(north|south)?(east|west)?)-\d`
AwsRegionRegex = `(af|ap|ca|eu|me|sa|us)-(central|(north|south)?(east|west)?)-\d`
AwsProfileRegex = `([A-Za-z_0-9-]+)`

GenerateAwsCommandState = &aws.GenerateAwsTfConfigurationArgs{}
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/generate_aws_eks_audit.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ var (
EksAuditAdvancedOptDone = "Done"

// AwsEksAuditRegionRegex regex used for validating region input; note intentionally does not match gov cloud
AwsEksAuditRegionRegex = `(us|ap|ca|eu|sa)-(central|(north|south)?(east|west)?)-\d`
AwsEksAuditRegionRegex = `(af|ap|ca|eu|me|sa|us)-(central|(north|south)?(east|west)?)-\d`

GenerateAwsEksAuditCommandState = &aws_eks_audit.GenerateAwsEksAuditTfConfigurationArgs{}
GenerateAwsEksAuditCommandExtraState = &AwsEksAuditGenerateCommandExtraState{}
Expand Down

0 comments on commit 0269d02

Please sign in to comment.