Skip to main content

Apply OpenAI gpt changes to an entire Terraform project directory

Project description

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."

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

terrafai-0.1.7.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

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

terrafai-0.1.7-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file terrafai-0.1.7.tar.gz.

File metadata

  • Download URL: terrafai-0.1.7.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for terrafai-0.1.7.tar.gz
Algorithm Hash digest
SHA256 194853208036c43dfca3d23f363d679c6719c1a55b71699539c0dccb28c6a85f
MD5 bc3b6cca55987474b557ae43cc9e1eff
BLAKE2b-256 9b7a650ff154ae248c2346aa60d5837ff0542d424cdbe16eb41c31809bd2eaa2

See more details on using hashes here.

File details

Details for the file terrafai-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: terrafai-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for terrafai-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 0ea30f8a8f1b634f7a25f1944ff7e6de4efc9580e83d7a88593a8043e0225ad9
MD5 c5f6ae9813edf57b4b9869441dd48a09
BLAKE2b-256 7194f163d5649ad236a9bee76b39d357eee10b3dc73973a3b55d76e76f5a6812

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