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
+5 -3
View File
@@ -1,10 +1,12 @@
resource "aws_instance" "example" {
ami = "${lookup(var.AMIS, var.AWS_REGION)}"
ami = var.AMIS[var.AWS_REGION]
instance_type = "t2.micro"
provisioner "local-exec" {
command = "echo ${aws_instance.example.private_ip} >> private_ips.txt"
command = "echo ${aws_instance.example.private_ip} >> private_ips.txt"
}
}
output "ip" {
value = "${aws_instance.example.public_ip}"
value = aws_instance.example.public_ip
}
+3 -2
View File
@@ -1,3 +1,4 @@
provider "aws" {
region = "${var.AWS_REGION}"
provider "aws" {
region = var.AWS_REGION
}
+3 -1
View File
@@ -1,11 +1,13 @@
variable "AWS_REGION" {
default = "eu-west-1"
}
variable "AMIS" {
type = "map"
type = map(string)
default = {
us-east-1 = "ami-13be557e"
us-west-2 = "ami-06b94666"
eu-west-1 = "ami-844e0bf7"
}
}
+4
View File
@@ -0,0 +1,4 @@
terraform {
required_version = ">= 0.12"
}