Skip to content

Instantly share code, notes, and snippets.

@pbzona
Created November 21, 2017 21:24
Show Gist options
  • Save pbzona/e71297871d9e23abaa94f76463fc4d18 to your computer and use it in GitHub Desktop.
Save pbzona/e71297871d9e23abaa94f76463fc4d18 to your computer and use it in GitHub Desktop.
CloudFormation - Join example in YAML
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] ]
@amitrathod6022
Copy link

Thank you for such a simple explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment