/tfw

Terraform Wrapper

Primary LanguagePythonMIT LicenseMIT

Terraform Wrapper

image

image

Documentation Status

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

Features

  • Check AWS Credentials
  • Setup a Terraform Remote State using AWS S3/DynamoDB (create bucket, create dynamodb table, generate remote_state.tf)

Feature Roadmap

  • 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/)

Reading

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

pip install --editable .