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 ParameterLabels: InstanceType: default: Type of EC2 Instance 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}