Skip to content

Commit 0269d02

Browse files
authored
chore(GROW-2289): Update AWS region regex (#1325)
1 parent c25e83a commit 0269d02

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cli/cmd/generate_aws.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var (
6565
// AwsArnRegex original source: https://regex101.com/r/pOfxYN/1
6666
AwsArnRegex = `^arn:(?P<Partition>[^:\n]*):(?P<Service>[^:\n]*):(?P<Region>[^:\n]*):(?P<AccountID>[^:\n]*):(?P<Ignore>(?P<ResourceType>[^:\/\n]*)[:\/])?(?P<Resource>.*)$` //nolint
6767
// AwsRegionRegex regex used for validating region input; note intentionally does not match gov cloud
68-
AwsRegionRegex = `(us|ap|ca|eu|sa)-(central|(north|south)?(east|west)?)-\d`
68+
AwsRegionRegex = `(af|ap|ca|eu|me|sa|us)-(central|(north|south)?(east|west)?)-\d`
6969
AwsProfileRegex = `([A-Za-z_0-9-]+)`
7070

7171
GenerateAwsCommandState = &aws.GenerateAwsTfConfigurationArgs{}

cli/cmd/generate_aws_eks_audit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ var (
7474
EksAuditAdvancedOptDone = "Done"
7575

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

7979
GenerateAwsEksAuditCommandState = &aws_eks_audit.GenerateAwsEksAuditTfConfigurationArgs{}
8080
GenerateAwsEksAuditCommandExtraState = &AwsEksAuditGenerateCommandExtraState{}

0 commit comments

Comments
 (0)