instance_type
EC2 instance type. Common types: t3.micro (dev), t3.small (small apps), t3.medium (general purpose), m5.large (production).
Common Instance Types
| Type | vCPUs | Memory | Use Case |
|---|---|---|---|
| t3.micro | 2 | 1 GB | Development |
| t3.small | 2 | 2 GB | Small apps |
| t3.medium | 2 | 4 GB | General purpose |
| m5.large | 2 | 8 GB | Production |
Best Practices
- Start small and scale up as needed
- Use t3 instances for burstable workloads
- Consider reserved instances for steady-state
Full Module Example
module "ec2_instance" {
source = "registry.patterneddesigns.ca/patterneddesigns/ec2-instance/aws"
version = "0.1.0"
# instance_type
instance_type = "..."
# Other required inputs
instance_name = "..."
ami_id = "..."
subnet_id = "..."
}