Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #62 from mgajda/master
Browse files Browse the repository at this point in the history
Add all valid regions as of July 19th 2018...
  • Loading branch information
jpignata authored Sep 8, 2018
2 parents 2404451 + 603d5bc commit d1a9e15
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CPU (CPU Units) Memory (MiB)
4096 8192 through 30720 in 1GiB increments
`)

var validRegions = []string{"us-east-1"}
var validRegions = []string{"us-east-1", "us-east-2", "us-west-2", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "eu-central-1", "eu-west-1"}

var (
clusterName string
Expand Down Expand Up @@ -105,11 +105,14 @@ CloudWatch Logs, and Amazon Route 53 into an easy-to-use CLI.`,
}
}

var foundRegion bool = false
for _, validRegion := range validRegions {
if region == validRegion {
foundRegion = true
break
}

}
if !foundRegion {
console.IssueExit("Invalid region: %s [valid regions: %s]", region, strings.Join(validRegions, ", "))
}

Expand Down

0 comments on commit d1a9e15

Please sign in to comment.