Skip to content

Commit

Permalink
Update static AMI lookup table
Browse files Browse the repository at this point in the history
  • Loading branch information
errordeveloper committed Nov 9, 2018
1 parent 690d59a commit 0444b0c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
15 changes: 9 additions & 6 deletions pkg/ami/static_resolver_ami.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,22 @@ package ami
var StaticImages = map[string]map[int]map[string]string{
"AmazonLinux2": {
ImageClassGPU: {
"eu-west-1": "ami-0706dc8a5eed2eed9",
"us-east-1": "ami-058bfb8c236caae89",
"us-west-2": "ami-0731694d53ef9604b",
"eu-west-1": "ami-0c3479bcd739094f0",
"us-east-1": "ami-0c974dde3f6d691a1",
"us-east-2": "ami-089849e811ace242f",
"us-west-2": "ami-08156e8fd65879a13",
},
ImageClassGeneral: {
"eu-west-1": "ami-0c7a4976cb6fafd3a",
"us-east-1": "ami-0440e4f6b9713faf6",
"us-west-2": "ami-0a54c984b9f908c81",
"eu-west-1": "ami-00c3b2d35bddd4f5c",
"us-east-1": "ami-0a0b913ef3249b655",
"us-east-2": "ami-0958a76db2d150238",
"us-west-2": "ami-0f54a2f7d2e9c88b3",
},
},
"Ubuntu1804": {ImageClassGeneral: {
"eu-west-1": "ami-07036622490f7e97b",
"us-east-1": "ami-06fd8200ac0eb656d",
"us-east-2": "ami-0866798422f5d546b",
"us-west-2": "ami-6322011b",
}},
}
12 changes: 6 additions & 6 deletions pkg/ami/static_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ var _ = Describe("AMI Static Resolution", func() {
Region: "us-west-2",
InstanceType: "t2.medium",
ImageFamily: "AmazonLinux2",
ExpectedAMI: "ami-0a54c984b9f908c81",
ExpectedAMI: "ami-0f54a2f7d2e9c88b3",
ExpectError: false,
}),
Entry("with non-gpu instance and us-east-1", ResolveCase{
Region: "us-east-1",
InstanceType: "t2.medium",
ImageFamily: "AmazonLinux2",
ExpectedAMI: "ami-0440e4f6b9713faf6",
ExpectedAMI: "ami-0a0b913ef3249b655",
ExpectError: false,
}),
Entry("with non-gpu instance and eu-west-1", ResolveCase{
Region: "eu-west-1",
InstanceType: "t2.medium",
ImageFamily: "AmazonLinux2",
ExpectedAMI: "ami-0c7a4976cb6fafd3a",
ExpectedAMI: "ami-00c3b2d35bddd4f5c",
ExpectError: false,
}),
Entry("with non-gpu instance and non-eks enabled region", ResolveCase{
Expand All @@ -63,21 +63,21 @@ var _ = Describe("AMI Static Resolution", func() {
Region: "us-west-2",
InstanceType: "p2.xlarge",
ImageFamily: "AmazonLinux2",
ExpectedAMI: "ami-0731694d53ef9604b",
ExpectedAMI: "ami-08156e8fd65879a13",
ExpectError: false,
}),
Entry("with gpu (p3) instance and us-east-1", ResolveCase{
Region: "us-east-1",
InstanceType: "p3.2xlarge",
ImageFamily: "AmazonLinux2",
ExpectedAMI: "ami-058bfb8c236caae89",
ExpectedAMI: "ami-0c974dde3f6d691a1",
ExpectError: false,
}),
Entry("with gpu (p2) instance and eu-west-1", ResolveCase{
Region: "eu-west-1",
InstanceType: "p2.xlarge",
ImageFamily: "AmazonLinux2",
ExpectedAMI: "ami-0706dc8a5eed2eed9",
ExpectedAMI: "ami-0c3479bcd739094f0",
ExpectError: false,
}),
Entry("with gpu (p3) instance and non-eks enabled region", ResolveCase{
Expand Down

0 comments on commit 0444b0c

Please sign in to comment.