One of the great features of Infrastructure as a Code ( IaC ) is the ability to keep all the infrastructure description in a Git repository. You can track any change made to the infrastructure, and even revert the infrastructure to a specific deployment just like with any other code. CloudFormation is one of the best IaC example out there. I use it to describe almost all of the AWS resources I manage. I generate the JSON template using the wonderful Python based tool named Troposphere . To make the JSON template creation even more flexible, I transform the Troposphere Python files to Ansible templates. I use Jenkins to orchestrate all the templating, JSON file generation, and creation or updating of the CloudFormation stacks. So, the flow is basically as follows: Create the Troposphere file as an Ansible template and insert Ansible variables or lookups where appropriate. Generate the Troposphere Python file from the ansible template using the Ansible templating engine. R
..share knowledge, share to be shared.