Created
September 4, 2018 02:55
-
-
Save lawliet89/f5a3d99974946b3df4b4f60cb06fb05c to your computer and use it in GitHub Desktop.
Terraform Demo Snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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