── 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_cidr
3 enable_dns_hostnames = true
4 enable_dns_support = true
5
6 tags = {
7 Name = "${var.project_name}-vpc"
8 }
9}
10
11resource "aws_subnet" "public" {
12 count = 2
13 vpc_id = aws_vpc.main.id
14 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 = true
17}
18
19module "eks" {
20 source = "terraform-aws-modules/eks/aws"
21 cluster_name = var.project_name
22 cluster_version = "1.27"
23 vpc_id = aws_vpc.main.id
24 subnet_ids = aws_subnet.public[*].id
25}

## GCP — main.tf

infra/gcp/main.tf
1resource "google_container_cluster" "primary" {
2 name = var.project_name
3 location = var.region
4
5 remove_default_node_pool = true
6 initial_node_count = 1
7}
8
9resource "google_container_node_pool" "primary_nodes" {
10 name = "${var.project_name}-node-pool"
11 location = var.region
12 cluster = google_container_cluster.primary.name
13 node_count = var.node_count
14
15 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_name
3 location = var.location
4}
5
6resource "azurerm_kubernetes_cluster" "main" {
7 name = var.project_name
8 location = azurerm_resource_group.main.location
9 resource_group_name = azurerm_resource_group.main.name
10 dns_prefix = var.project_name
11
12 default_node_pool {
13 name = "default"
14 node_count = var.node_count
15 vm_size = "Standard_D2_v2"
16 }
17
18 identity {
19 type = "SystemAssigned"
20 }
21}

## Variables

All providers share similar variables:

VariableDefaultDescription
project_namefrom .exo.yamlUsed for resource naming
regionprovider-specificDeployment region
node_count2Number of K8s worker nodes
vpc_cidr10.0.0.0/16VPC CIDR (AWS only)