Skip to main content

A terraform wrapper

Project description

Terraform Wrapper
=================

This project is intended to provide a wrapper around terraform for any projects where infrastructure might be duplicated in different environments. If you maintain different environments (dev, stage, prod) in separate regions, data centers, or different clouds this tool will help you maintain consistency across your infrastructure.

The Fundamentals
+++++++++++++

**Requirements**
you must have AWS credentials, and terraform already installed.

**Project Structure**
This project requires the following format:

```
.
├── environments
│   ├── dev
│   │   └── dev.tf
│   ├── environment_vars.json
│   ├── hub
│   │   └── hub.tf
│   └── prod
│   └── prod.tf
├── main.tf
└── variables.tf
```

In each project shared resources and variables are placed at the top level. Environment specific resources are placed under ``./environments/<environment_name>/<any files you want>``. The file ``./environment/environment_vars.json`` stores the information about your AWS remote state.

**Package Use**

Every time you run this package you need to specify the environment and the action. the environment is the name of the folder under ``./environments`` and the action is the typical action passed to terraform (ie. plan, destroy, apply, etc.)

A sample command would be: ``tf -environment prod -action plan``

**Usage Details**
When you run this command the tf-wrapper will:
- Symlink all files under ``./environments/<environment_name>/`` into the top level directory.
- It will delete the ``.terraform/terraform.tfstate`` and ``.terraform/terraform.tfstate.backup`` files as this project requires remote state config, negating the need for local copies of state after the run has completed.
- For commands ``apply`` and ``destroy`` the resulting run state will automatically be pushed.

Project details


Release history Release notifications

This version
History Node

1.0.0

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

History Node

0.0.19

History Node

0.0.18

History Node

0.0.17

History Node

0.0.16

History Node

0.0.15

History Node

0.0.14

History Node

0.0.13

History Node

0.0.12

History Node

0.0.11

History Node

0.0.10

History Node

0.0.9

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
tf_wrapper-1.0.0-py2.py3-none-any.whl (6.6 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Nov 17, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page