UPD: added mapping

This commit is contained in:
xpk 2020-06-27 15:10:06 +08:00
parent fb2d428841
commit ccb418c4be

View File

@ -13,22 +13,34 @@ Parameters:
Description: Timezone of instance
Type: String
Default: UTC
Mappings:
RegionMap:
us-west-1:
VpcId: vpc-7155ca14
ImageId: ami-0a8d75344fec6c412
SshKey: AROLINX-OREGON
SecGroups: ["sg-0c8c5cf4dca2147ee","sg-d444e4b2","sg-0b93187b","sg-859d16f5"]
eu-east-1:
VpcId:
ImageId:
SshKey: AROLINX-IRELAND
SecGroups: ["sg-0c8c5cf4dca2147ee","sg-d444e4b2","sg-0b93187b","sg-859d16f5"]
Resources:
InstanceSubnet:
Type: AWS::EC2::Subnet
Properties:
VpcId: "vpc-7155ca14"
VpcId: !FindInMap [RegionMap, !Ref "AWS::Region", VpcId]
CidrBlock: "10.2.253.0/28"
Ec2Instance:
Type: AWS::EC2::Instance
Properties:
KeyName: ACROLINX-OREGON
KeyName: !FindInMap [RegionMap, !Ref "AWS::Region", SshKey]
InstanceType: !Ref InputInstanceType
ImageId: ami-0a8d75344fec6c412
ImageId: !FindInMap [RegionMap, !Ref "AWS::Region", ImageId]
SubnetId: !Ref InstanceSubnet
SecurityGroupIds: ["sg-0c8c5cf4dca2147ee","sg-d444e4b2","sg-0b93187b","sg-859d16f5"]
SecurityGroupIds: !FindInMap [RegionMap, !Ref "AWS::Region", SecGroups]
Tags:
- Key: "Name"
Value: !Join ['', [!Ref 'InputSubdomain', ".acrolinx.cloud"]]