Terraform Example: Create EC2 Launch Template with Cloud-Init Userdata
Create Cloud-Init template
data "template_file" "cloud_init" {
template = "${file("init.tpl")}"
template = <<EOF
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="==BOUNDARY=="