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:

awesome-project:
  kind: gitlab # For terraform remote state backend integration
  path: ./infra/awesome-project/terraform # path relative to this config file's parent folder
  spec:
    url: "https://gitlab.com" # Your gitlab url
    state_name: awesome-state # Name of your remote terraform state
    project_id: 123456        # Identifier of the GitLab project to push state to and to load CI variables from
    token_var: GITLAB_TOKEN   # Environment variable containing gitlab token. Will be used to auto-load CI variables as ENV variables.

great-project:
  kind: gitlab
  path: ./infra/awesome-project/terraform
  spec:
    url: "https://gitlab.com"
    state_name: awesome-state
    project_id: 123456
    token_var: GITLAB_TOKEN

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:

  • --config_path: path to your configuration file.
  • --project: name of your project, as specified in your config file.

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

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

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.3.0.tar.gz (5.6 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.3.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tfrunner-0.3.0.tar.gz
  • Upload date:
  • Size: 5.6 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.3.0.tar.gz
Algorithm Hash digest
SHA256 40b3ac2df65acaf2cf1c40b283a4711644a0223e434982f3fb7fe1f68d5fd1d2
MD5 5b19b0c7969cd17ea59bf8356835a1ef
BLAKE2b-256 1e2f5b808c73b4f7e64a71413c5f936265d5821114db231d98c414820c66c93e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tfrunner-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30a3b0b41f238162d96ff5a08937078dd764760c23b42ff944e4ee58c36469e4
MD5 7ac1a9b3926832d1c8e11b4a1b009571
BLAKE2b-256 0657548d72ef3413ab38e63d3a84fe9426a64d3abe53d7561bd31492e55f26e3

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