Software Engineering :: Cloud :: AWS :: AWS CloudFormation
Made with ♥ by Polyglot.
Transform:
Name: 'AWS::Include'
Parameters:
Location: 's3://MyAmazonS3BucketName/MyFileName.yaml'
Description: >
Provide meaningful
description about
the template.
CopyAdd HighlightAdd Note
---
AWSTemplateFormatVersion: '2010-09-09'
Description: https://aws.amazon.com/blogs/devops/use-nested-stacks-to-create-reusable-templates-and-support-role-specialization/
Resources:
Vpc:
Type: 'AWS::CloudFormation::Stack'
Properties:
Parameters:
S3Endpoint: 'false' # speed up the example
DynamoDBEndpoint: 'false' # speed up the example
FlowLog: 'false' # speed up the example
NatGateways: 'false' # speed up the example
TemplateURL: './node_modules/@cfn-modules/vpc/module.yml'
Instance:
Type: 'AWS::CloudFormation::Stack'
Properties:
Parameters:
VpcModule: !GetAtt 'Vpc.Outputs.StackName' # reference the vpc module
UserData: |
yum install -y httpd24
service httpd start
echo "cfn-modules" > /var/www/html/index.html
IngressTcpPort1: '80' # open up port 80 to the world
TemplateURL: './node_modules/@cfn-modules/ec2-instance-amazon-linux/module.yml'
Outputs:
Url:
Value: !Sub 'http://${Instance.Outputs.PublicIpAddress}'
---
AWSTemplateFormatVersion: '2010-09-09'
Metadata:
License: Apache-2.0
Description: ...
Parameters:
Mappings:
Conditions:
Transform:
Resources:
Outputs: