── GENERATED OUTPUT ──
Terraform
Cloud provider infrastructure modules for AWS, GCP, and Azure.
## Generation
bash
exo gen infra --provider aws # or gcp, azure## Generated Structure
text
infra/└── aws/ # (or gcp/ or azure/) ├── main.tf # Core resources (VPC, EKS/GKE/AKS) ├── variables.tf # Input variables └── provider.tf # Provider configuration## AWS — main.tf
infra/aws/main.tf
1resource "aws_vpc" "main" {2 cidr_block = var.vpc_cidr3 enable_dns_hostnames = true4 enable_dns_support = true56 tags = {7 Name = "${var.project_name}-vpc"8 }9}1011resource "aws_subnet" "public" {12 count = 213 vpc_id = aws_vpc.main.id14 cidr_block = cidrsubnet(var.vpc_cidr, 8, count.index)15 availability_zone = data.aws_availability_zones.available.names[count.index]16 map_public_ip_on_launch = true17}1819module "eks" {20 source = "terraform-aws-modules/eks/aws"21 cluster_name = var.project_name22 cluster_version = "1.27"23 vpc_id = aws_vpc.main.id24 subnet_ids = aws_subnet.public[*].id25}## GCP — main.tf
infra/gcp/main.tf
1resource "google_container_cluster" "primary" {2 name = var.project_name3 location = var.region45 remove_default_node_pool = true6 initial_node_count = 17}89resource "google_container_node_pool" "primary_nodes" {10 name = "${var.project_name}-node-pool"11 location = var.region12 cluster = google_container_cluster.primary.name13 node_count = var.node_count1415 node_config {16 machine_type = "e2-medium"17 }18}## Azure — main.tf
infra/azure/main.tf
1resource "azurerm_resource_group" "main" {2 name = var.project_name3 location = var.location4}56resource "azurerm_kubernetes_cluster" "main" {7 name = var.project_name8 location = azurerm_resource_group.main.location9 resource_group_name = azurerm_resource_group.main.name10 dns_prefix = var.project_name1112 default_node_pool {13 name = "default"14 node_count = var.node_count15 vm_size = "Standard_D2_v2"16 }1718 identity {19 type = "SystemAssigned"20 }21}## Variables
All providers share similar variables:
| Variable | Default | Description |
|---|---|---|
project_name | from .exo.yaml | Used for resource naming |
region | provider-specific | Deployment region |
node_count | 2 | Number of K8s worker nodes |
vpc_cidr | 10.0.0.0/16 | VPC CIDR (AWS only) |