Skip to content

Instantly share code, notes, and snippets.

@geek182
Created April 12, 2017 18:29
Show Gist options
  • Save geek182/1a3cef4c6c13bb6b1836ebd3f1cdbd0b to your computer and use it in GitHub Desktop.
Save geek182/1a3cef4c6c13bb6b1836ebd3f1cdbd0b to your computer and use it in GitHub Desktop.
-------- vars.
variable "ebs_block_device" { default = { device_name = "/dev/sdc" }
type = "map"
}
-------- main.tf
resource "aws_launch_configuration" "LaunchConfig" {
name_prefix = "lc-${var.product}-"
image_id = "${var.ami_id}"
instance_type = "${var.instance_type}"
security_groups = ["${var.sg-ec2-id}"]
iam_instance_profile = "${var.instance_profile}"
key_name = "${var.key_pair}"
ebs_block_device = ["${var.ebs_block_device}"]
user_data = "${var.user_data}"
lifecycle {
create_before_destroy = true
}
}
erro i get : ebs_block_device.0: expected object, got string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment