Provider Configuration
NGINX
1provider "aws" {2 region = "us-east-1"3}Common Modules
- VPC β Create a reusable VPC module with subnets, routing tables.
- EC2 Instance β Parameterize AMI, instance type, tags.
- RDS β Managed database with automated backups.
Best Practices
- Keep secrets out of code β use SSM Parameter Store or Secrets Manager.
- Version modules and pin provider versions.
- Store state remotely with state locking (DynamoDB).