-
Notifications
You must be signed in to change notification settings - Fork 154
/
Copy pathintrinsic-functions.yaml
45 lines (40 loc) · 1.05 KB
/
intrinsic-functions.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
AWSTemplateFormatVersion: "2010-09-09"
Description: AWS CloudFormation workshop - Intrinsic functions (uksb-1q9p31idr) (tag:intrinsic-functions).
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: Amazon EC2 Configuration
Parameters:
- InstanceType
- AmiID
ParameterLabels:
InstanceType:
default: Type of EC2 Instance
AmiID:
default: Amazon Machine Image ID
Parameters:
InstanceType:
Description: Enter t2.micro or t2.small. Default is t2.micro.
Type: String
AllowedValues:
- t2.micro
- t2.small
Default: t2.micro
AmiID:
Description: The ID of the AMI.
Type: AWS::EC2::Image::Id
Resources:
WebServerInstance:
Type: AWS::EC2::Instance
Properties:
ImageId: !Ref AmiID
InstanceType: !Ref InstanceType
Tags:
- Key: Name
Value: !Join
- '-'
- - !Ref InstanceType
- webserver
- Key: InstanceType
Value: !Sub ${InstanceType}