-
Notifications
You must be signed in to change notification settings - Fork 139
/
outputs.yaml
50 lines (43 loc) · 1.13 KB
/
outputs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
AWSTemplateFormatVersion: "2010-09-09"
Description: AWS CloudFormation workshop - Outputs (uksb-1q9p31idr) (tag:outputs).
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: Amazon EC2 Configuration
Parameters:
- AmiID
ParameterLabels:
AmiID:
default: Amazon Machine Image ID
Parameters:
EnvironmentType:
Description: Specify the Environment type of the stack.
Type: String
Default: Test
AllowedValues:
- Dev
- Test
- Prod
ConstraintDescription: Specify either Dev, Test or Prod.
AmiID:
Type: AWS::EC2::Image::Id
Description: The ID of the AMI.
Mappings:
EnvironmentToInstanceType:
Dev:
InstanceType: t2.nano
Test:
InstanceType: t2.micro
Prod:
InstanceType: t2.small
Resources:
WebServerInstance:
Type: AWS::EC2::Instance
Properties:
ImageId: !Ref AmiID
InstanceType: !FindInMap [EnvironmentToInstanceType, !Ref EnvironmentType, InstanceType]
Tags:
- Key: Name
Value: !Join [ '-', [ !Ref EnvironmentType, webserver ] ]
# Add your code here!