Skip to main content

No project description provided

Project description

Tfrunner

Welcome to tfrunner, a cli tool to run terraform commands with the following facilities:

  • Multi-project support
  • Automation support
  • Remote backend
  • GitLab secrets pulling

Installation

Since tfrunner is a cli tool, the recommended installation is using pipx.

Please ensure you have a compatible python >= 3.12 version.

Install with: pipx install tfrunner

Usage

To use it to manage multiple projects, create a yaml file configuring each.

Here is an example file, let's name it tfrunner.yaml:

state_backend:
  kind: gitlab
  spec:
    url: https://gitlab.com
    project_id: 123456
    token_var: KUBORG_TOKEN

secrets_backend:
  kind: gitlab
  spec:
    url: https://gitlab.com
    project_id: 123456
    token_var: KUBORG_TOKEN

projects:
  great-project:
    path: ./infra/great-project/terraform
    state_name: great-state

  awesome-project:
    path: ./infra/awesome-project/terraform
    state_name: awesome-state

Now you can run tfrunner as you would run any regular terraform command (options are also included). You need only to be wary of two additional arguments that are needed:

  • --project: name of your project, as specified in your config file.
  • --config_path: path to your configuration file. By default it will look for a tfrunner.yaml file in the current folder

As examples, for the great-project in our example tfrunner.yaml file, you could run:

tfrunner init --project great-project
tfrunner fmt --project great-project
tfrunner validate --project great-project
tfrunner plan --project great-project
tfrunner apply --project great-project
tfrunner destroy --config_path tfrunner.yaml --project great-project

The --config_path is optional in the tfrunner destroy command, as tfrunner will by default assume its path to be tfrunner.yaml.

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

tfrunner-0.4.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tfrunner-0.4.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file tfrunner-0.4.0.tar.gz.

File metadata

  • Download URL: tfrunner-0.4.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.8 Linux/5.15.154+

File hashes

Hashes for tfrunner-0.4.0.tar.gz
Algorithm Hash digest
SHA256 306c56974e416f283341779948b3272c085bd36f8553769d3522ffddaf74f5f7
MD5 6e3dec6263e8551356a3507b8c6ba6e3
BLAKE2b-256 b702b8eea6f79ff0233773884bb353b54850a083ee45f3003ad60d84cada3308

See more details on using hashes here.

File details

Details for the file tfrunner-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: tfrunner-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.8 Linux/5.15.154+

File hashes

Hashes for tfrunner-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2348f66a3a5f6f6c9afdd04df32426afac1bbd5a5911ee562cc02419514dae9f
MD5 580424f2463aa70d32e52de13a65c930
BLAKE2b-256 35a88058a2012af6f7f99521e53782efac5cdaa1ac209fd5746634485e883e1a

See more details on using hashes here.

Supported by

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