/text_to_terraform

Tool that converts natural language to Terraform code

Primary LanguagePython

text_to_terraform

Tool that converts natural language to Terraform code

Prerequisites

Setup Instructions

  1. Clone the repo
  2. cd into the repo
  3. Run pip install -r requirements.txt (best to install it within a Python venv )
  4. Run terraform init -backend=false
  5. Run $env:OPENAI_API_KEY="<YOUR_OPENAI_API_KEY>" (this command may vary depending on the operating system)
  6. Run streamlit run .\app.py to open the web app locally
  7. Enter the description of desired resources into the textbox under "Return Terraform code to create..."
  8. Click on "Terraform it!" button
  9. The AI generated code will be shown below.
  10. To validate the generated code, enter the code snippet into the text box below and click on "Validate terraform code"