Created
February 15, 2019 13:20
-
-
Save Satak/2e9b8bd62a8ba20d44db849b7002a271 to your computer and use it in GitHub Desktop.
AWS CloudFormation Template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Resources: | |
MyInstance: | |
Type: 'AWS::EC2::Instance' | |
Properties: | |
AvailabilityZone: eu-west-1a | |
ImageId: | |
Ref: ImageId | |
KeyName: !Ref KeyName | |
InstanceType: | |
Ref: InstanceType | |
SubnetId: !Ref SubnetId | |
SecurityGroupIds: !Ref SecurityGroupIds | |
Tags: | |
- Key: Name | |
Value: | |
Ref: InstanceName | |
- Key: Environment | |
Value: | |
Ref: Environment | |
BlockDeviceMappings: | |
- DeviceName: /dev/sda1 | |
Ebs: | |
VolumeType: | |
Ref: VolumeType | |
VolumeSize: | |
Ref: VolumeSize | |
Parameters: | |
InstanceType: | |
Type: String | |
Default: t2.micro | |
AllowedValues: | |
- t2.micro | |
- t2.small | |
- t2.medium | |
Description: Enter t2.micro, t2.small, or t2.medium. Default is t2.micro. | |
Environment: | |
Type: String | |
Default: dev | |
AllowedValues: | |
- dev | |
- test | |
- prod | |
Description: Tags | |
InstanceName: | |
Type: String | |
ImageId: | |
Type: String | |
AllowedValues: | |
- ami-00035f41c82244dab | |
- centos-7.6-plain-x86_64-181207_14-disk001-6f5e98a1-bc66-4b6a-a37d-efb4b2472f8a-ami-0372f888c4e669f49.4 | |
SecurityGroupIds: | |
Type: List<AWS::EC2::SecurityGroup::Id> | |
KeyName: | |
Type: AWS::EC2::KeyPair::KeyName | |
SubnetId: | |
Type: AWS::EC2::Subnet::Id | |
VolumeSize: | |
Type: Number | |
MinValue: 8 | |
MaxValue: 100 | |
VolumeType: | |
Type: String | |
Default: gp2 | |
AllowedValues: | |
- gp2 | |
- st1 | |
- io1 | |
- sc1 | |
Description: gp2 = SSD, st1 = HDD, io1 = IOPS SSD, sc1 = Cold HDD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment