Skip to content

Commit

Permalink
Updating module for terraform 0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
arodd committed Jul 18, 2019
1 parent 4364c47 commit 802c392
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ data "aws_ami" "ubuntu" {
}

resource "aws_instance" "this" {
ami = "${data.aws_ami.ubuntu.id}"
ami = data.aws_ami.ubuntu.id
instance_type = "t2.micro"

tags = {
Owner = "Consumer"
}
}

4 changes: 3 additions & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ locals {
#this_id = "${compact(concat(coalescelist(aws_instance.this.*.id, list("")))}"}
#this_id = "${compact(concat(coalescelist(aws_instance.this.*.id, aws_instance.this_t2.*.id), list("")))}"}
}

output "id" {
description = "List of IDs of instances"
value = ["${aws_instance.this.*.id}"]
value = [aws_instance.this.*.id]
}

1 change: 1 addition & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ variable "name" {
variable "instance_count" {
description = "Number of EC2 instances"
}

4 changes: 4 additions & 0 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

terraform {
required_version = ">= 0.12"
}

0 comments on commit 802c392

Please sign in to comment.