HIPAA Terraform means writing infrastructure-as-code that enforces the privacy and security rules in the Health Insurance Portability and Accountability Act. It is not optional if you handle Protected Health Information (PHI). Every resource you create in Terraform must be locked to HIPAA-grade standards, or it won’t pass an audit.
Start with storage. Use aws_s3_bucket with server_side_encryption_configuration set to AES256 or AWS-KMS. Block public access. Add lifecycle rules to delete unused data automatically.
Secure networks next. In Terraform, define aws_vpc with private subnets for PHI workloads. Route incoming traffic through AWS Application Load Balancers with TLS 1.2+ only. Apply strict aws_security_group rules—no wide-open CIDR blocks.
Logs must be immutable. aws_cloudtrail and aws_config resources should capture every change. Send them to encrypted S3 or CloudWatch with retention policies that meet HIPAA’s data retention period.