Created
January 15, 2019 12:14
Baby's First CloudFormation Stack
This file contains 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
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: | |
Global configuration that could be used by multiple related stacks | |
# Metadata: # no metadata | |
Parameters: | |
Environment: | |
Type: String | |
Description: | |
Stack Environment Prefix. | |
Resources: | |
# We need at least one resource. The VPC is the logical one to include here. | |
VPC: | |
Type: AWS::EC2::VPC | |
Properties: | |
# The range of ip addresses used in the VPC. Subnets will be inside this. | |
# Using the /16 lets me easily have subnets that don't overlap without | |
# needing to remember bit masks. | |
CidrBlock: 10.0.0.0/16 # 10.0.0.0 -> 10.0.255.255 | |
EnableDnsSupport: true # If false, the servers don't seem to get access to DNS at all. | |
InstanceTenancy: default | |
Tags: | |
- Key: Name | |
Value: !Sub "${Environment} VPC" | |
Outputs: | |
VPC: | |
Description: The ID for the Virtual Private Cloud; needed by more or less everything. | |
Value: !Ref VPC | |
Export: | |
Name: !Sub "${Environment}::VPC" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An example 'global' CloudFormation stack, defining resources that we don't want to have to remove and recreate unnecessarily. See https://twasink.net/2019/01/11/ail-babys-first-cloudformation-stack/