Add a disto mapping to get the image name.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
Angus Salkeld 2012-03-15 15:08:59 +11:00
parent 83ba8d9519
commit c0b95312c4
1 changed files with 14 additions and 9 deletions

View File

@ -59,6 +59,12 @@
"MaxLength": "41", "MaxLength": "41",
"AllowedPattern" : "[a-zA-Z0-9]*", "AllowedPattern" : "[a-zA-Z0-9]*",
"ConstraintDescription" : "must contain only alphanumeric characters." "ConstraintDescription" : "must contain only alphanumeric characters."
},
"LinuxDistribution": {
"Default": "F17",
"Description" : "Distribution of choice",
"Type": "String",
"AllowedValues" : [ "F16", "F17", "U10", "RHEL-6.1", "RHEL-6.2", "RHEL-6.3" ]
} }
}, },
@ -75,14 +81,13 @@
"c1.xlarge" : { "Arch" : "64" }, "c1.xlarge" : { "Arch" : "64" },
"cc1.4xlarge" : { "Arch" : "64" } "cc1.4xlarge" : { "Arch" : "64" }
}, },
"AWSRegionArch2AMI" : { "DistroArch2AMI": {
"us-east-1" : { "32" : "ami-7f418316", "64" : "ami-7341831a" }, "F16" : { "32" : "F16", "64" : "F16-x86_64" },
"us-west-1" : { "32" : "ami-951945d0", "64" : "ami-971945d2" }, "F17" : { "32" : "F17", "64" : "F17-x86_64" },
"us-west-2" : { "32" : "ami-16fd7026", "64" : "ami-10fd7020" }, "U10" : { "32" : "U10", "64" : "U10-x86_64" },
"eu-west-1" : { "32" : "ami-24506250", "64" : "ami-20506254" }, "RHEL-6.1" : { "32" : "rhel61", "64" : "rhel61-x86_64" },
"sa-east-1" : { "32" : "ami-3e3be423", "64" : "ami-3c3be421" }, "RHEL-6.2" : { "32" : "rhel62", "64" : "rhel62-x86_64" },
"ap-southeast-1" : { "32" : "ami-74dda626", "64" : "ami-7edda62c" }, "RHEL-6.3" : { "32" : "rhel63", "64" : "rhel63-x86_64" }
"ap-northeast-1" : { "32" : "ami-dcfa4edd", "64" : "ami-e8fa4ee9" }
} }
}, },
@ -111,7 +116,7 @@
} }
}, },
"Properties": { "Properties": {
"ImageId" : { "Fn::FindInMap" : [ "AWSRegionArch2AMI", { "Ref" : "AWS::Region" }, "ImageId" : { "Fn::FindInMap" : [ "DistroArch2AMI", { "Ref" : "LinuxDistribution" },
{ "Fn::FindInMap" : [ "AWSInstanceType2Arch", { "Ref" : "InstanceType" }, "Arch" ] } ] }, { "Fn::FindInMap" : [ "AWSInstanceType2Arch", { "Ref" : "InstanceType" }, "Arch" ] } ] },
"InstanceType" : { "Ref" : "InstanceType" }, "InstanceType" : { "Ref" : "InstanceType" },
"KeyName" : { "Ref" : "KeyName" }, "KeyName" : { "Ref" : "KeyName" },