Skip to main content

Generates and modifies terraform code in JSON syntax.

Project description

tfadm - Terraform administrator

Tfadm (or Terraform Administrator) is a program that generates and modifies terraform code in JSON syntax.

The goal is to help system administrators easily manage Infrastructure as Code (IaC), simplify documentation, reduce training time for new employees, and enable users with little or no knowledge of terraform code to operate the system.

In no way does tfadm attempts to replace terraform command functionalities. Tfadm just enables you to automate the creation and modification of terraform code.

Some of tfadm features are:

  • Generates and modifies terraform code in bulk;
  • Converts existing infrastructure into terraform code;
  • Associates existing infrastructure with the terraform resources, if not already under terraform management.
  • Copies changes made directly to the infrastructure into terraform code;

Install

Install and update using pip:

python3 -m pip install -U tfadm
tfadm version

Install and update using pip and virtual environments:

python3 -m venv --clear --upgrade-deps --prompt tfadm ~/.venv/tfadm
source ~/.venv/tfadm/bin/activate
pip install --upgrade pip
pip install -U tfadm
tfadm version

To leave your virtual environment, simply run:

deactivate

Usage

tfadm [OPTIONS] COMMAND [ARGS]...

Options

-V, --version
Show the version and exit.
-h, --help
Show help message and exit.

Commands

create
Creates an object from stdin.
help
Show help message and exit.
resources
Lists the available resources.
sync
Copies changes to the infrastructure into terraform code.
update
Updates an object from stdin.
version
Show the version and exit.

Use tfadm COMMAND --help for more information about a given command.

Resources

Tfadm depends on a set of configuration files (resources) to operate, in YAML format.

See tfadm-resources to get started.

Dependencies

  • $ click_, to create the "beautiful" command line interface;
  • Jinja, to allow code expressions in resource files more safely (not yet used as a template engine);
  • parse, to do the the opposite of format() in a very specific situation, which most likely could be done with regular expressions;
  • python-slugify, python-slugify, to create slugs that can be used to name terraform blocks;
  • PyYAML, to parse configuration files and data from stdin and dump data to stdout.

Author

tfadm was created by Nuno Cardoso.

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

tfadm-0.14.1.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

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

tfadm-0.14.1-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

Details for the file tfadm-0.14.1.tar.gz.

File metadata

  • Download URL: tfadm-0.14.1.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for tfadm-0.14.1.tar.gz
Algorithm Hash digest
SHA256 2378b02fb2c4bec1763a3cf505b14579948d02490b0e427c991db3160d33d14f
MD5 db876b773a841b4960928b1d6967e923
BLAKE2b-256 061869ce8b30abccdadac6121e22dd8d02a80892c75b21ae4df36388546b5a65

See more details on using hashes here.

File details

Details for the file tfadm-0.14.1-py3-none-any.whl.

File metadata

  • Download URL: tfadm-0.14.1-py3-none-any.whl
  • Upload date:
  • Size: 25.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for tfadm-0.14.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8847952ca2b153b406b2d9ead8bf6475923ba60e9cc1a66476bd0a3213f6cded
MD5 b653e0290492ebd9585ccb8f7e6f8d06
BLAKE2b-256 30ef3d37c4ce140f1eda6bff0af5d25bec6ed74530f20ed803da058a258cde80

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