Skip to content

Instantly share code, notes, and snippets.

@maraca
Last active January 4, 2016 18:49
Show Gist options
  • Select an option

  • Save maraca/8662976 to your computer and use it in GitHub Desktop.

Select an option

Save maraca/8662976 to your computer and use it in GitHub Desktop.
Sandwich example
region: us-east-1
hosted_zone: &hosted_zone cotap.com
key_name: &key_name sandbox_environment
cidr_block: &cidr_block "10.123"
azs: &azs "us-east-1a,us-east-1c,us-east-1d"
az1: &az1 "us-east-1a"
az2: &az2 "us-east-1c"
az3: &az3 "us-east-1d"
ami_ebs: &ami_ebs ami-123456
ami_instance_store: &ami_instance_store ami-abcdefg
ami_nat: &ami_nat ami-abcd1234
stacks:
- name: VPC
template: vpc.json
parameters:
- param_name: CIDRBlock
value: *cidr_block
- name: PublicSubnets
template: public-subnets.json
parameters:
- param_name: InternetGateway
value:
stack: VPC
output: InternetGateway
- param_name: VpcId
value:
stack: VPC
output: VpcId
- param_name: AZ1
value: *az1
- param_name: AZ2
value: *az2
- param_name: AZ3
value: *az3
- param_name: CIDRBlock
value: *cidr_block
- name: PrivateSubnets
template: private-subnets.json
parameters:
- param_name: VpcId
value:
stack: VPC
output: VpcId
- param_name: AZ1
value: *az1
- param_name: AZ2
value: *az2
- param_name: AZ3
value: *az3
- param_name: CIDRBlock
value: *cidr_block
- name: NAT
template: nat.json
parameters:
- param_name: KeyName
value: *key_name
- param_name: InstanceImageId
value: *ami_nat
- param_name: InstanceType
value: "m1.small"
- param_name: VpcId
value:
stack: VPC
output: VpcId
- param_name: PublicSubnet
value:
stack: PublicSubnets
output: SubnetIdAZ1
- param_name: PrivateRouteTable
value:
stack: PrivateSubnets
output: PrivateSubnetRouteTable
- param_name: CIDRBlock
value: *cidr_block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment