[!["Buy Me A Coffee"](https://img.shields.io/badge/Buy_Me_A_Coffee-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/miltlima)
# 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:
```shell
pip3 install terramagic
```
### Usage
#### Creating a new project
To create a new Terraform project, use the create command:
```shell
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:
```shell
terramagic create --name infra
```
This will generate a new directory called "infra" with the following structure:
```code
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:
```shell
terramagic delete --name <project_name>
```
For example, to delete the "myapp" project, run:
```shell
terramagic delete --name infra
```
Help
For detailed information about available commands and options, run:
```shell
terramagic --help
```
This will display the following message:
```shell
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!
Raw data
{
"_id": null,
"home_page": "https://github.com/miltlima/terramagic",
"name": "terramagic",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "",
"keywords": "terraform,terramagic,python",
"author": "Milton Jesus",
"author_email": "milton.lima@outlook.com",
"download_url": "https://files.pythonhosted.org/packages/66/68/03d507edbb9dd6304a63f726517c4b693dc6d70240b290f0c11f8ef1a2f9/terramagic-0.3.0.tar.gz",
"platform": null,
"description": "[![\"Buy Me A Coffee\"](https://img.shields.io/badge/Buy_Me_A_Coffee-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/miltlima)\n\n# Terramagic CLI\n\nTerramagic is a command-line interface tool that makes it easy to create and manage Terraform projects.\n\n## Motivation\n\nCreating 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.\n\n### Requirements\n\nPython 3.9 or higher\n\n### Installation\n\nYou can easily install Terramagic using pip:\n\n```shell\npip3 install terramagic\n```\n\n### Usage\n\n#### Creating a new project\n\nTo create a new Terraform project, use the create command:\n\n```shell\nterramagic create --name <project_name> \n```\n\nFor example, to create a project called \"infra\" automatically 3 environments are created (\"development\", \"staging\" and \"production\") and respective tfvars, run:\n\n```shell\nterramagic create --name infra\n```\n\nThis will generate a new directory called \"infra\" with the following structure:\n\n```code\ninfra\n\u251c\u2500\u2500 backend.tf\n\u251c\u2500\u2500 environments\n\u2502 \u251c\u2500\u2500 development\n\u2502 \u2502 \u2514\u2500\u2500 development.tfvars\n\u2502 \u251c\u2500\u2500 production\n\u2502 \u2502 \u2514\u2500\u2500 production.tfvars\n\u2502 \u2514\u2500\u2500 staging\n\u2502 \u2514\u2500\u2500 staging.tfvars\n\u251c\u2500\u2500 main.tf\n\u251c\u2500\u2500 main.tfvars\n\u251c\u2500\u2500 modules\n\u2502 \u251c\u2500\u2500 cluster\n\u2502 \u2502 \u251c\u2500\u2500 main.tf\n\u2502 \u2502 \u251c\u2500\u2500 outputs.tf\n\u2502 \u2502 \u2514\u2500\u2500 variables.tf\n\u2502 \u251c\u2500\u2500 instance\n\u2502 \u2502 \u251c\u2500\u2500 main.tf\n\u2502 \u2502 \u251c\u2500\u2500 outputs.tf\n\u2502 \u2502 \u2514\u2500\u2500 variables.tf\n\u2502 \u2514\u2500\u2500 vpc\n\u2502 \u251c\u2500\u2500 main.tf\n\u2502 \u251c\u2500\u2500 outputs.tf\n\u2502 \u2514\u2500\u2500 variables.tf\n\u251c\u2500\u2500 outputs.tf\n\u251c\u2500\u2500 providers\n\u2502 \u2514\u2500\u2500 provider.tf\n\u2514\u2500\u2500 variables.tf\n```\n\nYou can then edit these files to define your infrastructure resources and variables.\n\n#### Deleting a project\n\nTo delete an existing project, use the delete command and specify the project name:\n\n```shell\nterramagic delete --name <project_name>\n```\n\nFor example, to delete the \"myapp\" project, run:\n\n```shell\nterramagic delete --name infra\n```\n\nHelp\nFor detailed information about available commands and options, run:\n\n```shell\nterramagic --help\n```\n\nThis will display the following message:\n\n```shell\nUsage: terramagic [OPTIONS] COMMAND [ARGS]...\n\n ClI tool to create Terraform project\n\nOptions:\n -v, --version Show version\n --help Show this message and exit.\n\nCommands:\n create Create a new Terraform project with specified name and environment\n remove Delete the project\n```\n\nEnjoy using Terramagic to simplify your Terraform workflow!\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A automate tool for terraform projects",
"version": "0.3.0",
"project_urls": {
"Homepage": "https://github.com/miltlima/terramagic",
"Repository": "https://github.com/miltlima/terramagic"
},
"split_keywords": [
"terraform",
"terramagic",
"python"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "13f518eedac78a417c7b682f5f45a9bb29edadc7d33a6c6bb7321c0f5e1bcb28",
"md5": "804434a390dca8157de201ca1ec8c93f",
"sha256": "0be4ca823d3293edbfb05299b8dfd66cbb16359333131691cf770980f0795f9b"
},
"downloads": -1,
"filename": "terramagic-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "804434a390dca8157de201ca1ec8c93f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 5364,
"upload_time": "2023-09-06T00:32:20",
"upload_time_iso_8601": "2023-09-06T00:32:20.938763Z",
"url": "https://files.pythonhosted.org/packages/13/f5/18eedac78a417c7b682f5f45a9bb29edadc7d33a6c6bb7321c0f5e1bcb28/terramagic-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "666803d507edbb9dd6304a63f726517c4b693dc6d70240b290f0c11f8ef1a2f9",
"md5": "9a5adc6f918395b7aa568ef1d34c1b52",
"sha256": "44e6c340acb40d9a78ff3e48492ba236473bb44af2fa8835481f26a3088334c4"
},
"downloads": -1,
"filename": "terramagic-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "9a5adc6f918395b7aa568ef1d34c1b52",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 3989,
"upload_time": "2023-09-06T00:32:21",
"upload_time_iso_8601": "2023-09-06T00:32:21.958633Z",
"url": "https://files.pythonhosted.org/packages/66/68/03d507edbb9dd6304a63f726517c4b693dc6d70240b290f0c11f8ef1a2f9/terramagic-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-06 00:32:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "miltlima",
"github_project": "terramagic",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "terramagic"
}