Skip to content

noodlensk/troposphere-demo

Repository files navigation

troposphere-demo

An example of usage troposphere for generation of Cloud Formation templates.

Example contains template which can be used for generation of VPC with 3 following multi-az subnets:

  • Public (Outbound internet access)
  • Private (No internet access)
  • Protected (Outbound internet access via NAT)

VPC Cidr as well as "DNS Hostnames" parameter can be configured via Cloud Formation Parameters .

Template can be reused for creation of different environments, see usage section.

Generated templates could be validated using cfn-guard util against predefined rules(e.g. to ensure that all resources contain set of mandatory tags for billing purposes)

Usage

Requirements:

  • Python 3.9 (may work on lower version, but not tested yet)
  • Pip
  • Brew (used for installation of cfn-guard, pre-commit)
make help # Print help

make setup # Setup (Mac OS only)

make dep # Download dependencies

make generate # Generate Cloud Formation template

aws cloudformation create-stack --stackname mystack # Deploy created template to dev env
--template-body file:https:///$(pwd)/templates/output/resources.yaml
--parameters file:https:///$(pwd)/envs/dev.json

Development

See CONTRIBUTING.md for code style and tooling.

TODO

  • E2E testing with taskcat
  • Establish naming convention for resources and setup validation rules for it
  • Move dynamic part of template from Cloudformation to Troposphere(?)
  • Extend example with sceptre for managing Cloudformation stacks
  • Add diagram of created arch

Refs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published