Terraform with Cloud Init on EC2 Instances in Private Subnets with VPC Endpoints

Brad Campbell Amazon Web Services, Cloud Technology

Recently, I was working on a Terraform script for a client that required some instance-level provisioning at creation time. The user_data atrribute of Terraform’s aws_instance provider is a perfect use-case for this sort of setup. In this case, I was working with an Amazon Linux AMI, so I elected to work with cloud-init as my user_data mechanism (vs vanilla shell …