wrapper for terraform to streamline setup & multi-environment repos using terraform in a CI/CD pipeline
(based on multiple embedded scripts written in bash: https://github.com/jenkins201/packer-terraform-cicd-aws/blob/master/scripts/tf-wrapper.sh
- Free software: MIT license
- Documentation: https://tfw.readthedocs.io.
- Check AWS Credentials
- Setup a Terraform Remote State using AWS S3/DynamoDB (create bucket, create dynamodb table, generate remote_state.tf)
- Setup a Terraform Remote State using Azure StorageAccount (create X, create table, generate remote_state.tf)
- Generate YAML/JSON inventory of EC2, RDS, LBs etc (for consumption by hiera, ansible etc)
- Git Branch/Terraform .tfvars mapping (master -> master.tfvars, $branch -> $branch.tfvars with non-master-defaults.tfvars fall through)
- Git Branch/Terraform Workspace mapping (create/delete workspaces for CI builds)
- Use Azure MSI to get SPI Auth tokens for Terraform (https://azure.microsoft.com/en-gb/resources/samples/resource-manager-python-manage-resources-with-msi/)
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
pip install --editable .