Contents

Chapter 1

Features

This chapter covers the core features and capabilities of Terraform Starter.

Features

  • Generate Terraform configs for AWS-style infrastructure (provider-agnostic patterns)
  • Scaffolds complete module structure: main.tf, variables.tf, outputs.tf, terraform.tfvars
  • VPC/networking with public and private subnets
  • Compute instances with configurable size and count
  • RDS-style database resources with secure defaults
  • S3-compatible storage buckets with versioning and encryption
  • Environment-specific tfvars files (dev, staging, production)
  • Remote state backend configuration
  • Validates your infrastructure spec before generating
  • Python stdlib only — zero dependencies

Quick Start

bash
# Generate Terraform configs from the example spec
python src/terraform_generator.py --config examples/infra_spec.json

# Write to a target directory
python src/terraform_generator.py --config examples/infra_spec.json --output-dir ./terraform/

# Generate only specific components
python src/terraform_generator.py --config examples/infra_spec.json --components vpc,compute

# Validate config without generating
python src/terraform_generator.py --config examples/infra_spec.json --validate-only
Chapter 2

Configuration Reference

Follow this guide to get Terraform Starter up and running in your environment.

Configuration Reference

Create a JSON file with these fields:

FieldTypeRequiredDescription
project_namestringYesProject name (used in resource naming)
regionstringNoCloud region (default: us-east-1)
providerstringNoCloud provider: aws (default: aws)
environmentsarrayNoEnvironments to generate tfvars for
vpcobjectNoVPC config: cidr, public_subnets, private_subnets
computeobjectNoCompute config: instance_type, count, ami
databaseobjectNoDB config: engine, instance_class, allocated_storage
storageobjectNoS3 config: bucket_name, versioning, encryption
state_backendobjectNoRemote state: bucket, key, dynamodb_table
tagsobjectNoDefault tags applied to all resources

CLI Reference

FlagDescription
--config, -cPath to the JSON infrastructure spec (required)
--output-dir, -oDirectory to write Terraform files (default: stdout preview)
--componentsComma-separated list of components to generate
--validate-onlyOnly validate config, don't generate
--verbose, -vEnable debug logging
Chapter 3
🔒 Available in full product

Generated Files

You’ve reached the end of the free preview

Get the full Terraform Starter and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $29 →
📦 Free sample included — download another copy for the full product.
Terraform Starter v1.0.0 — Free Preview