Skip to content

Instantly share code, notes, and snippets.

@lawliet89
Created September 4, 2018 02:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lawliet89/f5a3d99974946b3df4b4f60cb06fb05c to your computer and use it in GitHub Desktop.
Save lawliet89/f5a3d99974946b3df4b4f60cb06fb05c to your computer and use it in GitHub Desktop.
Terraform Demo Snippet
resource "aws_instance" "instance" {
ami = "${data.aws_ami.ubuntu.id}"
instance_type = "${var.instance_type}"
key_name = "${var.ssh_key_name}"
subnet_id = "${var.subnet_id}"
vpc_security_group_ids = ["${aws_security_group.instance.id}"]
tags = "${merge(var.tags, map("Name", "${var.name}"))}"
volume_tags = "${merge(var.tags, map("Name", "${var.name}"))}"
root_block_device {
volume_type = "gp2"
volume_size = "8"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment