Terraform 0.12 (#20)

* Terraform 0.12
This commit is contained in:
Edward Viaene
2019-10-06 13:46:10 +02:00
committed by GitHub
parent 9e31795a58
commit 5d9eeb6c4c
201 changed files with 2528 additions and 2006 deletions
+12 -12
View File
@@ -1,29 +1,29 @@
resource "aws_instance" "example" {
ami = "${lookup(var.AMIS, var.AWS_REGION)}"
ami = var.AMIS[var.AWS_REGION]
instance_type = "t2.micro"
# the VPC subnet
subnet_id = "${aws_subnet.main-public-1.id}"
subnet_id = aws_subnet.main-public-1.id
# the security group
vpc_security_group_ids = ["${aws_security_group.allow-ssh.id}"]
vpc_security_group_ids = [aws_security_group.allow-ssh.id]
# the public SSH key
key_name = "${aws_key_pair.mykeypair.key_name}"
key_name = aws_key_pair.mykeypair.key_name
}
resource "aws_ebs_volume" "ebs-volume-1" {
availability_zone = "eu-west-1a"
size = 20
type = "gp2"
tags {
Name = "extra volume data"
}
availability_zone = "eu-west-1a"
size = 20
type = "gp2"
tags = {
Name = "extra volume data"
}
}
resource "aws_volume_attachment" "ebs-volume-1-attachment" {
device_name = "/dev/xvdh"
volume_id = "${aws_ebs_volume.ebs-volume-1.id}"
instance_id = "${aws_instance.example.id}"
volume_id = aws_ebs_volume.ebs-volume-1.id
instance_id = aws_instance.example.id
}