This repository contains a collection of OpenTofu (formerly Terraform) examples demonstrating various infrastructure patterns and best practices.
basic-infra/: Contains basic infrastructure examples including VPC setup and networking configurations001state/: State management and backend configuration002vpc/: VPC and networking infrastructure003securitygroups/: Security group configurations004s3/: S3 bucket configurations005acm/: ACM certificate configurations006cloudflare/: Cloudflare configurations007secrets/: AWS Secrets Manager configurations008rds/: RDS database configurations009alb/: Application Load Balancer configurations010ec2/: EC2 instance configurations
modules/: Reusable OpenTofu modulesplaybooks/: Ansible playbooks for infrastructure automationdocs/: Documentation and diagrams
- Install OpenTofu (formerly Terraform) on your system
- Configure your AWS credentials
- Navigate to the desired example directory
- Initialize the configuration:
tofu init
- Apply the configuration:
tofu apply
- OpenTofu (formerly Terraform) >= 1.0.0
- AWS CLI configured with appropriate credentials
- Basic understanding of AWS services and infrastructure concepts
Feel free to submit issues and enhancement requests!