Skip to content

Commit

Permalink
Merge pull request #7273 from terraform-providers/td-aws_instance-dat…
Browse files Browse the repository at this point in the history
…asource-0.12-syntax

service/ec2: Various Terraform 0.12 syntax fixes
  • Loading branch information
bflad authored Jan 23, 2019
2 parents 0b8c5aa + ba4486f commit 51d7335
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion aws/data_source_aws_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ resource "aws_instance" "web" {
}
data "aws_instance" "web-instance" {
instance_tags {
instance_tags = {
Name = "${aws_instance.web.tags["Name"]}"
TestSeed = "%d"
}
Expand Down
10 changes: 7 additions & 3 deletions aws/data_source_aws_instances_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ resource "aws_instance" "test" {
data "aws_instances" "test" {
filter {
name = "instance-id"
values = ["${aws_instance.test.*.id}"]
values = [
"${aws_instance.test.*.id[0]}",
"${aws_instance.test.*.id[1]}",
"${aws_instance.test.*.id[2]}",
]
}
}
`
Expand Down Expand Up @@ -121,7 +125,7 @@ resource "aws_instance" "test" {
}
data "aws_instances" "test" {
instance_tags {
instance_tags = {
Name = "${aws_instance.test.0.tags["Name"]}"
SecondTag = "${aws_instance.test.1.tags["Name"]}"
}
Expand Down Expand Up @@ -157,7 +161,7 @@ resource "aws_instance" "test" {
}
data "aws_instances" "test" {
instance_tags {
instance_tags = {
Name = "${aws_instance.test.0.tags["Name"]}"
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/instances.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ and you'd need to re-run `apply` every time an instance comes up or dies.

```hcl
data "aws_instances" "test" {
instance_tags {
instance_tags = {
Role = "HardWorker"
}
Expand Down

0 comments on commit 51d7335

Please sign in to comment.