tfenv

command module
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2025 License: MIT Imports: 6 Imported by: 0

README ΒΆ

tfenv - Terraform Environment Manager

tfenv is a simple CLI tool that converts .env files into terraform.tfvars for easy integration with Terraform. It supports Windows, Linux, and macOS.


πŸš€ Installation

Go

You can install this by using:

go install github.com/henrriusdev/tfenv@latest
Windows

Run the following command in PowerShell:

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/henrriusdev/tfenv/main/install.ps1" -OutFile "install.ps1"
.\install.ps1

After installation, restart the terminal and run:

tfenv

Linux/macOS

Run the following command in Terminal:

curl -fsSL https://raw.githubusercontent.com/henrriusdev/tfenv/main/install.sh | bash

Once installed, you can run:

tfenv

🎯 Usage

  1. Navigate to your project directory.
  2. If the .env file exists, just run:
    tfenv
    
    Otherwise, you will be prompted to enter the .env file path.
  3. The tool will convert it to terraform.tfvars and optionally generate variables.tf.

πŸ›  Features

  • Converts .env to terraform.tfvars
  • Generates variables.tf (optional)
  • Interactive CLI with Bubble Tea and Huh
  • Works on Windows, Linux, and macOS
  • Can be installed with Go

πŸ”§ Contributing

  1. Clone the repository:
    git clone https://github.com/henrriusdev/tfenv.git
    
  2. Navigate to the project:
    cd tfenv
    
  3. Build the project:
    go build -o tfenv
    
  4. Run it:
    ./tfenv
    

πŸ“œ License

This project is licensed under the MIT License.

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL