Skip to main content

"Buy Me A Coffee"

Terramagic CLI

Terramagic is a command-line interface tool that makes it easy to create and manage Terraform projects.

Motivation

Creating a new Terraform project from scratch can be time-consuming and error-prone. With Terramagic, you can quickly generate a template for your project and customize it to your needs.

Requirements

Python 3.9 or higher

Installation

You can easily install Terramagic using pip:

pip3 install terramagic

Usage

Creating a new project

To create a new Terraform project, use the create command:

terramagic create --name <project_name> 

For example, to create a project called "infra" automatically 3 environments are created ("development", "staging" and "production") and respective tfvars, run:

terramagic create --name infra

This will generate a new directory called "infra" with the following structure:

infra
├── backend.tf
├── environments
│   ├── development
│   │   └── development.tfvars
│   ├── production
│   │   └── production.tfvars
│   └── staging
│       └── staging.tfvars
├── main.tf
├── main.tfvars
├── modules
│   ├── cluster
│   │   ├── main.tf
│   │   ├── outputs.tf
│   │   └── variables.tf
│   ├── instance
│   │   ├── main.tf
│   │   ├── outputs.tf
│   │   └── variables.tf
│   └── vpc
│       ├── main.tf
│       ├── outputs.tf
│       └── variables.tf
├── outputs.tf
├── providers
│   └── provider.tf
└── variables.tf

You can then edit these files to define your infrastructure resources and variables.

Deleting a project

To delete an existing project, use the delete command and specify the project name:

terramagic delete --name <project_name>

For example, to delete the "myapp" project, run:

terramagic delete --name infra

Help For detailed information about available commands and options, run:

terramagic --help

This will display the following message:

Usage: terramagic [OPTIONS] COMMAND [ARGS]...

  ClI tool to create Terraform project

Options:
  -v, --version  Show version
  --help         Show this message and exit.

Commands:
  create  Create a new Terraform project with specified name and environment
  remove  Delete the project

Enjoy using Terramagic to simplify your Terraform workflow!

Release files for terramagic 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for terramagic 0.3.0
File Size Uploaded
terramagic-0.3.0.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for terramagic 0.3.0
File Interpreter ABI Platform
terramagic-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 kB

Release files / terramagic-0.3.0.tar.gz

Download URL terramagic-0.3.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
44e6c340acb40d9a78ff3e48492ba236473bb44af2fa8835481f26a3088334c4
BLAKE2b-256 checksum
How to use checksums
666803d507edbb9dd6304a63f726517c4b693dc6d70240b290f0c11f8ef1a2f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.4 Darwin/22.6.0

Release files / terramagic-0.3.0-py3-none-any.whl

Download URL terramagic-0.3.0-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0be4ca823d3293edbfb05299b8dfd66cbb16359333131691cf770980f0795f9b
BLAKE2b-256 checksum
How to use checksums
13f518eedac78a417c7b682f5f45a9bb29edadc7d33a6c6bb7321c0f5e1bcb28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.4 Darwin/22.6.0

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.9

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page