Skip to content

Commit

Permalink
Fix static AMI lookup table generator
Browse files Browse the repository at this point in the history
  • Loading branch information
errordeveloper committed Nov 9, 2018
1 parent 4262001 commit 2a23265
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/ami/static_resolver_ami_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func main() {
log.Printf("looking up %s images", family)
for class := range ami.ImageSearchPatterns[family] {
classImages := Dict{}
for _, region := range api.SupportedRegions {
for _, region := range api.SupportedRegions() {
p := ami.ImageSearchPatterns[family][class]
log.Printf("looking up images matching %q in %q", p, region)
image, err := ami.FindImage(client[region], p)
Expand Down Expand Up @@ -76,7 +76,7 @@ func newSession(region string) *session.Session {

func newMultiRegionClient() map[string]*ec2.EC2 {
clients := make(map[string]*ec2.EC2)
for _, region := range api.SupportedRegions {
for _, region := range api.SupportedRegions() {
clients[region] = ec2.New(newSession(region))
}
return clients
Expand Down

0 comments on commit 2a23265

Please sign in to comment.