Skip to main content

An orchestration tool for Terraform

Project description

terraform-worker

terraform-worker is a command line tool for pipelining terraform operations while sharing state between them. The worker consumese a yaml configuration file which is broken up into two sections, definitions (which were really just top level modules) and sub-modules. The definitions are put into a worker config in order, with the terraform variables, and remote state variables. Following is a sample configuration file and command:

./worker.yaml

terraform:
  providers:
    aws:
      vars:
        region: //aws-region//
        version: "~> 2.61"

  # global level variables
  terraform_vars:
    region: //aws-region//
    environment: dev

  definitions:
    # Either setup a VPC and resources, or deploy into an existing one
    network:
      path: /definitions/aws/network-existing

    database:
      path: /definitions/aws/rds

  plugins:
    aws:
      version: 2.61.0
% worker --aws-profile default --backend s3 terraform --show-output example1

NOTE: When adding a provider from a non-hashicorp source, use a source field, as follows (the source field is only valid for terraform 13+ and is not emitted when using 12):

providers:
...
  kubectl:
    vars:
      version: "~> 1.9"
    source: "gavinbunney/kubectl"

Development

 # virtualenv setup stuf... and then:
 % pip install poetry && make init

Background

The terraform worker was a weekend project to run terraform against a series of definitions (modules). The idea was the configuration vars, provider configuration, remote state, and variables from remote state would all be dynamically generated. The purpose was for building kubernetes deployments, and allowing all of the configuration information to be stored as either yamnl files in github, or have the worker configuration generated by an API which stored all of the deployment configurations in a database.

Project details


Download files

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

Source Distribution

terraform-worker-0.7.5.linux-x86_64.tar.gz (49.2 kB view details)

Uploaded Source

Built Distribution

terraform_worker-0.7.5-py2.py3-none-any.whl (41.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file terraform-worker-0.7.5.linux-x86_64.tar.gz.

File metadata

  • Download URL: terraform-worker-0.7.5.linux-x86_64.tar.gz
  • Upload date:
  • Size: 49.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.5

File hashes

Hashes for terraform-worker-0.7.5.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 54542208e0111028d0942e7770b791a8390d1e9c6632fcdedc1d08a6c716d65c
MD5 46cf97dec91aad775a1b3a7e689d714d
BLAKE2b-256 4c0f147a299f117370da767dae241bfdcec63e51f9222929f49e1f572dbf5471

See more details on using hashes here.

File details

Details for the file terraform_worker-0.7.5-py2.py3-none-any.whl.

File metadata

  • Download URL: terraform_worker-0.7.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 41.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.5

File hashes

Hashes for terraform_worker-0.7.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0d7c5a2cadbe5b033739024f908adc5fb205f087c9ad20b367d68fea3d81ecc0
MD5 9111b3289c4c69e19c8ff37ad0392ce8
BLAKE2b-256 8fb2ef0b2a9ec8cac0da6061e5465a2a9bd2520f877bced97e6369f5375ee134

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page