Skip to content

jacobm3/terrafai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terrafai: Supercharge Your Terraform Projects with GPT-4

Terrafai is an open-source CLI tool that allows you to edit an entire Terraform project directory with GPT-4, the LLM behind ChatGPT. Make sweeping changes at once:

  • Refactor an entire project
  • Change resource naming conventions
  • Apply your company's latest resource tagging standards
  • Anything ChatGPT can do, but at the project level

Features

🤖 GPT-4 Integration: Utilize the power of OpenAI's GPT-4 to manipulate your Terraform configurations.
⚙️ Automated Checks: Pre- and post-checks with 'terraform validate' to ensure quality.
🔄 Diff Output: Visualize changes before they're made.
🛠️ Flexible Operations: Specify any bulk operations. Will be passed into prompt template.

All changes will be placed into a timestamped subdirectory of your current project.

Many improvements to come!

Prerequisites

Installation

pip install terrafai

Finally, add your OpenAI API Key to your environment variables:

export OPENAI_API_KEY='your-api-key-here'

Usage

Basic usage, from inside your Terraform project directory:

terrafai -d -op "Append '-demo' to all resource names."

About

LLM operations on Terraform project directories

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages