Skip to content

Instantly share code, notes, and snippets.

@kcoleman731
Created September 21, 2017 00:53
Show Gist options
  • Select an option

  • Save kcoleman731/f6d0665f11927ee5560691dac5101191 to your computer and use it in GitHub Desktop.

Select an option

Save kcoleman731/f6d0665f11927ee5560691dac5101191 to your computer and use it in GitHub Desktop.
resource "aws_launch_configuration" "ecs-launch-configuration" {
name = "${var.launch-configuration-name}"
image_id = "${var.image-id}"
instance_type = "${var.instance-type}"
iam_instance_profile = "${var.ecs-instance-profile-name}"
security_groups = ["${var.security-group-id}"]
associate_public_ip_address = "true"
key_name = "${var.ecs-key-pair-name}"
user_data = "${template_file.ecs-launch-configuration-user-data.rendered}"
}
resource "template_file" "ecs-launch-configuration-user-data" {
template = "${file("${path.module}/user-data.tpl")}"
vars {
ecs-cluster-name = "${var.ecs-cluster-name}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment