Skip to main content

IaNL: Infrastructure as Natural Language — AI agent that provisions AWS resources from plain English prompts using OpenTofu/Terraform.

Project description

AWS Logo        Terraform Logo

IaNL: Infrastructure as Natural Language ☁️🤖

Why write HCL when you can just talk to your Cloud?


📖 Overview

IaNL (Infrastructure as Natural Language) is an AI-powered cloud architecture agent that bridges the gap between high-level architectural thoughts and fully deployed, secure AWS environments.

Instead of manually clicking through the AWS Console or meticulously writing HashiCorp Configuration Language (HCL) syntax, you simply describe your desired infrastructure in plain English. The IaNL Agent autonomously plans, provisions, self-heals, and manages the state lifecycle of your cloud resources using OpenTofu/Terraform under the hood.

✨ Core Capabilities

  • 🧠 Natural Language to IaC: Converts plain English prompts into complete, multi-file Terraform modules (main.tf, variables.tf, outputs.tf).
  • 🔐 Strategic Self-Permissioning: Runs pre-flight IAM checks. If it lacks necessary permissions (and is authorized to do so), it can self-bootstrap the required policies before touching infrastructure.
  • 🛠️ Autonomous Self-Healing: If an AWS API error occurs during deployment (e.g., mismatched subnets, missing dependencies), the agent reads the stderr, refactors the HCL code on the fly, and seamlessly re-applies.
  • 🛡️ Secure-by-Default: Automatically enforces AWS best practices. Routes credentials through AWS Secrets Manager, enforces KMS encryption, blocks S3 public access, and ensures least-privilege Security Groups.
  • 💾 Full State Lifecycle Management: Powered by OpenTofu and an SQLite memory backend, the agent remembers previous sessions. You can ask it to tear down specific environments gracefully without leaving orphaned resources.

🏗️ Tech Stack

  • Orchestration: Python & LangGraph
  • LLM Brain: Mistral Small (via ChatMistralAI)
  • IaC Engine: OpenTofu / Terraform
  • State Persistence: SQLite & Local Filesystem
  • Cloud Provider: Amazon Web Services (AWS)

🚀 Example Usage

You don't write code; you start a conversation:

User: "Deploy a micro MySQL RDS instance. Generate a secure 16-character password automatically, store it in AWS Secrets Manager under the name 'db-creds', and configure the RDS instance to use that secret for its master password. "

What the Agent does autonomously:

  1. Verifies AWS credentials and Region availability.
  2. Generates a 10-resource Terraform module (VPC, Subnet, IGW, Route Table, Security Group, Keys, EC2).
  3. Executes tofu init, plan, and apply.
  4. Intercepts and fixes any dependency or network mapping errors automatically.
  5. Saves the .pem file locally with secure 0400 permissions.
  6. Outputs the exact ssh command for you to connect.

⚙️ Getting Started

Prerequisites

  • Python 3.10+
  • OpenTofu installed and added to PATH.
  • AWS CLI installed and configured.

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/IaNL-Agent.git
    cd IaNL-Agent
    
  2. Install dependencies:
Bash
pip install -r requirements.txt
  1. Set your environment variables:
Bash
export MISTRAL_API_KEY="your_api_key_here"
export AWS_ACCESS_KEY_ID="your_aws_key"
export AWS_SECRET_ACCESS_KEY="your_aws_secret"
  1. Run the Agent:
python main.py

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

ianl_agent-0.1.2.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

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

ianl_agent-0.1.2-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file ianl_agent-0.1.2.tar.gz.

File metadata

  • Download URL: ianl_agent-0.1.2.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for ianl_agent-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4ed96eb899e529b4c3c87c0927041c565702199394992ae532bbc1630e34e877
MD5 a7b44efb54e3bad4a9ee952b08f2f132
BLAKE2b-256 587ebfffe9fe88766d379d12df5eda2cfc018bbabe48f68bdad06422429be807

See more details on using hashes here.

File details

Details for the file ianl_agent-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: ianl_agent-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for ianl_agent-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e18f7c554c2db831e3806d19bc7a6d7b323a39f89b80c507efa2108b76ab195e
MD5 7b90865d0eb1ac190eb5dca6c06ea0b4
BLAKE2b-256 7469f31c6b0afc15c7321fb5b2b8d10b9f72896926c99e0e85a32343a8f0dcec

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