Created
November 21, 2017 21:24
-
-
Save pbzona/e71297871d9e23abaa94f76463fc4d18 to your computer and use it in GitHub Desktop.
CloudFormation - Join example in YAML
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
Parameters: | |
App: | |
Description: "Examples: blog, api" | |
Type: String | |
Env: | |
Description: "Examples: prod, stag, dev" | |
Type: String | |
Role: | |
Description: "Examples: web, worker, scheduler" | |
Type: String | |
Resources: | |
EC2Instance: | |
Type: AWS::EC2::Instance | |
Properties: | |
InstanceType: t2.micro | |
KeyName: 'default' # keypair must already exist | |
ImageId: ami-6869aa05 # AMI us-east-1 | |
Tags: | |
- | |
Key: Name | |
Value: !Join [ '-', [!Ref App, !Ref Role, !Ref Env] ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for such a simple explanation!