From b33a970b62d5a216a5f776e50750248b3b7ef9e6 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Fri, 4 May 2018 20:26:07 -0700 Subject: [PATCH] core: fix test fixtures for HCL2 syntax idiom A number of our test fixtures were previously using the non-idiomatic form of including a single child attribute all on one line with the block header and bounding braces. This non-idiomatic form is an error in HCL2, and hclfmt has always "fixed" it to the expected form of each attribute being on a line of its own, and so here we just update all the affected test fixtures to canonical form (using hclfmt), allowing them to be parsed as intended. Since the these entire files were processed with hclfmt, there are some other unrelated style changes included in situations where the file layouts were non-idiomatic in other ways. --- .../test-fixtures/apply-cbd-count/main.tf | 9 ++++++--- .../apply-cbd-deposed-only/main.tf | 4 +++- .../apply-multi-var-order-interp/main.tf | 14 ++++++++------ .../apply-multi-var-order/main.tf | 10 ++++++---- .../apply-output-orphan-module/child/main.tf | 4 +++- .../test-fixtures/apply-output-orphan/main.tf | 4 +++- .../apply-provider-alias-configure/main.tf | 11 +++++++---- .../apply-provisioner-module/main.tf | 4 +++- .../test-fixtures/apply-ref-existing/main.tf | 8 +++++--- .../child/main.tf | 4 +++- .../graph-builder-apply-dep-cbd/main.tf | 4 +++- .../graph-builder-apply-double-cbd/main.tf | 8 ++++++-- .../A/main.tf | 8 ++++++-- .../main.tf | 12 +++++++----- .../child1/main.tf | 5 ++++- .../child2/main.tf | 5 ++++- .../main.tf | 9 +++++++-- .../input-interpolate-var/source/main.tf | 4 +++- .../test-fixtures/issue-5254/step-0/main.tf | 6 ++++-- .../plan-cbd-maintain-root/main.tf | 10 ++++++++-- terraform/test-fixtures/plan-cbd/main.tf | 4 +++- .../plan-cdb-depends-datasource/main.tf | 9 ++++++--- .../plan-computed-value-in-map/main.tf | 19 ++++++++++--------- .../main.tf | 8 +++++--- .../plan-count-module-static/main.tf | 8 +++++--- .../plan-module-deadlock/child/main.tf | 5 ++++- .../A/main.tf | 4 +++- .../B/main.tf | 4 +++- .../plan-module-provider-var/main.tf | 8 +++++--- .../plan-module-var/child/main.tf | 4 ++-- .../test-fixtures/plan-module-var/main.tf | 4 ++-- .../plan-module-wrong-var-type/inner/main.tf | 15 +++++++++------ .../plan-targeted-cross-module/A/main.tf | 6 ++++-- .../child1/main.tf | 5 ++++- .../child2/main.tf | 5 ++++- .../test-fixtures/refresh-no-state/main.tf | 4 +++- .../transform-destroy-edge-basic/main.tf | 5 ++++- .../child/main.tf | 6 ++++-- .../transform-destroy-edge-multi/main.tf | 10 ++++++++-- .../transform-flat-config-basic/main.tf | 7 +++++-- .../transform-module-var-basic/child/main.tf | 4 +++- .../child/child/main.tf | 4 +++- .../transform-orphan-count/main.tf | 4 +++- .../source/main.tf | 6 ++++-- 44 files changed, 205 insertions(+), 96 deletions(-) diff --git a/terraform/test-fixtures/apply-cbd-count/main.tf b/terraform/test-fixtures/apply-cbd-count/main.tf index 2c5a9fbec..058d3382c 100644 --- a/terraform/test-fixtures/apply-cbd-count/main.tf +++ b/terraform/test-fixtures/apply-cbd-count/main.tf @@ -1,5 +1,8 @@ resource "aws_instance" "bar" { - count = 2 - foo = "bar" - lifecycle { create_before_destroy = true } + count = 2 + foo = "bar" + + lifecycle { + create_before_destroy = true + } } diff --git a/terraform/test-fixtures/apply-cbd-deposed-only/main.tf b/terraform/test-fixtures/apply-cbd-deposed-only/main.tf index 4e5f481c5..0d2e2d3f9 100644 --- a/terraform/test-fixtures/apply-cbd-deposed-only/main.tf +++ b/terraform/test-fixtures/apply-cbd-deposed-only/main.tf @@ -1,3 +1,5 @@ resource "aws_instance" "bar" { - lifecycle { create_before_destroy = true } + lifecycle { + create_before_destroy = true + } } diff --git a/terraform/test-fixtures/apply-multi-var-order-interp/main.tf b/terraform/test-fixtures/apply-multi-var-order-interp/main.tf index d6e6ae236..d4abcefdb 100644 --- a/terraform/test-fixtures/apply-multi-var-order-interp/main.tf +++ b/terraform/test-fixtures/apply-multi-var-order-interp/main.tf @@ -1,15 +1,17 @@ -variable "count" { default = 15 } +variable "count" { + default = 15 +} resource "aws_instance" "bar" { - count = "${var.count}" - foo = "index-${count.index}" + count = "${var.count}" + foo = "index-${count.index}" } resource "aws_instance" "baz" { - count = "${var.count}" - foo = "baz-${element(aws_instance.bar.*.foo, count.index)}" + count = "${var.count}" + foo = "baz-${element(aws_instance.bar.*.foo, count.index)}" } output "should-be-11" { - value = "${element(aws_instance.baz.*.foo, 11)}" + value = "${element(aws_instance.baz.*.foo, 11)}" } diff --git a/terraform/test-fixtures/apply-multi-var-order/main.tf b/terraform/test-fixtures/apply-multi-var-order/main.tf index 53e6cf01d..a5c9698e2 100644 --- a/terraform/test-fixtures/apply-multi-var-order/main.tf +++ b/terraform/test-fixtures/apply-multi-var-order/main.tf @@ -1,10 +1,12 @@ -variable "count" { default = 15 } +variable "count" { + default = 15 +} resource "aws_instance" "bar" { - count = "${var.count}" - foo = "index-${count.index}" + count = "${var.count}" + foo = "index-${count.index}" } output "should-be-11" { - value = "${element(aws_instance.bar.*.foo, 11)}" + value = "${element(aws_instance.bar.*.foo, 11)}" } diff --git a/terraform/test-fixtures/apply-output-orphan-module/child/main.tf b/terraform/test-fixtures/apply-output-orphan-module/child/main.tf index 70619c4e3..ae32f8aa1 100644 --- a/terraform/test-fixtures/apply-output-orphan-module/child/main.tf +++ b/terraform/test-fixtures/apply-output-orphan-module/child/main.tf @@ -1 +1,3 @@ -output "foo" { value = "bar" } +output "foo" { + value = "bar" +} diff --git a/terraform/test-fixtures/apply-output-orphan/main.tf b/terraform/test-fixtures/apply-output-orphan/main.tf index 70619c4e3..ae32f8aa1 100644 --- a/terraform/test-fixtures/apply-output-orphan/main.tf +++ b/terraform/test-fixtures/apply-output-orphan/main.tf @@ -1 +1,3 @@ -output "foo" { value = "bar" } +output "foo" { + value = "bar" +} diff --git a/terraform/test-fixtures/apply-provider-alias-configure/main.tf b/terraform/test-fixtures/apply-provider-alias-configure/main.tf index 9a9c43894..4487e4573 100644 --- a/terraform/test-fixtures/apply-provider-alias-configure/main.tf +++ b/terraform/test-fixtures/apply-provider-alias-configure/main.tf @@ -1,11 +1,14 @@ provider "another" { - foo = "bar" + foo = "bar" } provider "another" { - alias = "two" - foo = "bar" + alias = "two" + foo = "bar" } resource "another_instance" "foo" {} -resource "another_instance" "bar" { provider = "another.two" } + +resource "another_instance" "bar" { + provider = "another.two" +} diff --git a/terraform/test-fixtures/apply-provisioner-module/main.tf b/terraform/test-fixtures/apply-provisioner-module/main.tf index 38c53ca90..1f95749fa 100644 --- a/terraform/test-fixtures/apply-provisioner-module/main.tf +++ b/terraform/test-fixtures/apply-provisioner-module/main.tf @@ -1 +1,3 @@ -module "child" { source = "./child" } +module "child" { + source = "./child" +} diff --git a/terraform/test-fixtures/apply-ref-existing/main.tf b/terraform/test-fixtures/apply-ref-existing/main.tf index 8aa356391..a05056c52 100644 --- a/terraform/test-fixtures/apply-ref-existing/main.tf +++ b/terraform/test-fixtures/apply-ref-existing/main.tf @@ -1,7 +1,9 @@ -resource "aws_instance" "foo" { foo = "bar" } +resource "aws_instance" "foo" { + foo = "bar" +} module "child" { - source = "./child" + source = "./child" - var = "${aws_instance.foo.foo}" + var = "${aws_instance.foo.foo}" } diff --git a/terraform/test-fixtures/context-required-version-module/child/main.tf b/terraform/test-fixtures/context-required-version-module/child/main.tf index 8d915e4b7..3b52ffab9 100644 --- a/terraform/test-fixtures/context-required-version-module/child/main.tf +++ b/terraform/test-fixtures/context-required-version-module/child/main.tf @@ -1 +1,3 @@ -terraform { required_version = ">= 0.5.0" } +terraform { + required_version = ">= 0.5.0" +} diff --git a/terraform/test-fixtures/graph-builder-apply-dep-cbd/main.tf b/terraform/test-fixtures/graph-builder-apply-dep-cbd/main.tf index 0a25da772..380ecd429 100644 --- a/terraform/test-fixtures/graph-builder-apply-dep-cbd/main.tf +++ b/terraform/test-fixtures/graph-builder-apply-dep-cbd/main.tf @@ -1,5 +1,7 @@ resource "aws_instance" "A" { - lifecycle { create_before_destroy = true } + lifecycle { + create_before_destroy = true + } } resource "aws_instance" "B" { diff --git a/terraform/test-fixtures/graph-builder-apply-double-cbd/main.tf b/terraform/test-fixtures/graph-builder-apply-double-cbd/main.tf index bc121744d..6c361e1d9 100644 --- a/terraform/test-fixtures/graph-builder-apply-double-cbd/main.tf +++ b/terraform/test-fixtures/graph-builder-apply-double-cbd/main.tf @@ -1,9 +1,13 @@ resource "aws_instance" "A" { - lifecycle { create_before_destroy = true } + lifecycle { + create_before_destroy = true + } } resource "aws_instance" "B" { value = ["${aws_instance.A.*.id}"] - lifecycle { create_before_destroy = true } + lifecycle { + create_before_destroy = true + } } diff --git a/terraform/test-fixtures/graph-builder-apply-module-destroy/A/main.tf b/terraform/test-fixtures/graph-builder-apply-module-destroy/A/main.tf index 656540d80..84a8f7ed7 100644 --- a/terraform/test-fixtures/graph-builder-apply-module-destroy/A/main.tf +++ b/terraform/test-fixtures/graph-builder-apply-module-destroy/A/main.tf @@ -1,7 +1,11 @@ variable "input" {} resource "null_resource" "foo" { - triggers { input = "${var.input}" } + triggers { + input = "${var.input}" + } } -output "output" { value = "${null_resource.foo.id}" } +output "output" { + value = "${null_resource.foo.id}" +} diff --git a/terraform/test-fixtures/graph-builder-apply-module-destroy/main.tf b/terraform/test-fixtures/graph-builder-apply-module-destroy/main.tf index b374934bf..5c5b4d8c5 100644 --- a/terraform/test-fixtures/graph-builder-apply-module-destroy/main.tf +++ b/terraform/test-fixtures/graph-builder-apply-module-destroy/main.tf @@ -1,11 +1,13 @@ -variable "input" { default = "value" } +variable "input" { + default = "value" +} module "A" { - source = "./A" - input = "${var.input}" + source = "./A" + input = "${var.input}" } module "B" { - source = "./A" - input = "${module.A.output}" + source = "./A" + input = "${module.A.output}" } diff --git a/terraform/test-fixtures/graph-builder-plan-target-module-provider/child1/main.tf b/terraform/test-fixtures/graph-builder-plan-target-module-provider/child1/main.tf index 48bfc9c84..c9aaff5f7 100644 --- a/terraform/test-fixtures/graph-builder-plan-target-module-provider/child1/main.tf +++ b/terraform/test-fixtures/graph-builder-plan-target-module-provider/child1/main.tf @@ -1,4 +1,7 @@ variable "key" {} -provider "null" { key = "${var.key}" } + +provider "null" { + key = "${var.key}" +} resource "null_resource" "foo" {} diff --git a/terraform/test-fixtures/graph-builder-plan-target-module-provider/child2/main.tf b/terraform/test-fixtures/graph-builder-plan-target-module-provider/child2/main.tf index 48bfc9c84..c9aaff5f7 100644 --- a/terraform/test-fixtures/graph-builder-plan-target-module-provider/child2/main.tf +++ b/terraform/test-fixtures/graph-builder-plan-target-module-provider/child2/main.tf @@ -1,4 +1,7 @@ variable "key" {} -provider "null" { key = "${var.key}" } + +provider "null" { + key = "${var.key}" +} resource "null_resource" "foo" {} diff --git a/terraform/test-fixtures/graph-builder-plan-target-module-provider/main.tf b/terraform/test-fixtures/graph-builder-plan-target-module-provider/main.tf index 78e799d5a..b9822a4f8 100644 --- a/terraform/test-fixtures/graph-builder-plan-target-module-provider/main.tf +++ b/terraform/test-fixtures/graph-builder-plan-target-module-provider/main.tf @@ -1,2 +1,7 @@ -module "child1" { source = "./child1" } -module "child2" { source = "./child2" } +module "child1" { + source = "./child1" +} + +module "child2" { + source = "./child2" +} diff --git a/terraform/test-fixtures/input-interpolate-var/source/main.tf b/terraform/test-fixtures/input-interpolate-var/source/main.tf index fb7b33fb3..a67cacc3c 100644 --- a/terraform/test-fixtures/input-interpolate-var/source/main.tf +++ b/terraform/test-fixtures/input-interpolate-var/source/main.tf @@ -1 +1,3 @@ -output "list" { value = "foo,bar,baz" } +output "list" { + value = "foo,bar,baz" +} diff --git a/terraform/test-fixtures/issue-5254/step-0/main.tf b/terraform/test-fixtures/issue-5254/step-0/main.tf index 14b39194e..717d241a9 100644 --- a/terraform/test-fixtures/issue-5254/step-0/main.tf +++ b/terraform/test-fixtures/issue-5254/step-0/main.tf @@ -1,7 +1,9 @@ -variable "c" { default = 1 } +variable "c" { + default = 1 +} resource "template_file" "parent" { - count = "${var.c}" + count = "${var.c}" template = "Hi" } diff --git a/terraform/test-fixtures/plan-cbd-maintain-root/main.tf b/terraform/test-fixtures/plan-cbd-maintain-root/main.tf index 9a826475c..99c96b9ee 100644 --- a/terraform/test-fixtures/plan-cbd-maintain-root/main.tf +++ b/terraform/test-fixtures/plan-cbd-maintain-root/main.tf @@ -1,11 +1,17 @@ resource "aws_instance" "foo" { count = "2" - lifecycle { create_before_destroy = true } + + lifecycle { + create_before_destroy = true + } } resource "aws_instance" "bar" { count = "2" - lifecycle { create_before_destroy = true } + + lifecycle { + create_before_destroy = true + } } output "out" { diff --git a/terraform/test-fixtures/plan-cbd/main.tf b/terraform/test-fixtures/plan-cbd/main.tf index 6edd78aef..83d173a53 100644 --- a/terraform/test-fixtures/plan-cbd/main.tf +++ b/terraform/test-fixtures/plan-cbd/main.tf @@ -1,3 +1,5 @@ resource "aws_instance" "foo" { - lifecycle { create_before_destroy = true } + lifecycle { + create_before_destroy = true + } } diff --git a/terraform/test-fixtures/plan-cdb-depends-datasource/main.tf b/terraform/test-fixtures/plan-cdb-depends-datasource/main.tf index 3deae1f8b..7307a4c7b 100644 --- a/terraform/test-fixtures/plan-cdb-depends-datasource/main.tf +++ b/terraform/test-fixtures/plan-cdb-depends-datasource/main.tf @@ -1,11 +1,14 @@ resource "aws_instance" "foo" { - count = 2 + count = 2 num = "2" compute = "${element(data.aws_vpc.bar.*.id, count.index)}" - lifecycle { create_before_destroy = true } + + lifecycle { + create_before_destroy = true + } } data "aws_vpc" "bar" { count = 2 - foo = "${count.index}" + foo = "${count.index}" } diff --git a/terraform/test-fixtures/plan-computed-value-in-map/main.tf b/terraform/test-fixtures/plan-computed-value-in-map/main.tf index b820b1705..ef2cf0809 100644 --- a/terraform/test-fixtures/plan-computed-value-in-map/main.tf +++ b/terraform/test-fixtures/plan-computed-value-in-map/main.tf @@ -3,13 +3,14 @@ resource "aws_computed_source" "intermediates" {} module "test_mod" { source = "./mod" - services { - "exists" = "true" - "elb" = "${aws_computed_source.intermediates.computed_read_only}" - } - - services { - "otherexists" = " true" - "elb" = "${aws_computed_source.intermediates.computed_read_only}" - } + services = [ + { + "exists" = "true" + "elb" = "${aws_computed_source.intermediates.computed_read_only}" + }, + { + "otherexists" = " true" + "elb" = "${aws_computed_source.intermediates.computed_read_only}" + }, + ] } diff --git a/terraform/test-fixtures/plan-count-module-static-grandchild/main.tf b/terraform/test-fixtures/plan-count-module-static-grandchild/main.tf index 547bbde9d..b2c7ca66e 100644 --- a/terraform/test-fixtures/plan-count-module-static-grandchild/main.tf +++ b/terraform/test-fixtures/plan-count-module-static-grandchild/main.tf @@ -1,6 +1,8 @@ -variable "foo" { default = "3" } +variable "foo" { + default = "3" +} module "child" { - source = "./child" - value = "${var.foo}" + source = "./child" + value = "${var.foo}" } diff --git a/terraform/test-fixtures/plan-count-module-static/main.tf b/terraform/test-fixtures/plan-count-module-static/main.tf index 547bbde9d..b2c7ca66e 100644 --- a/terraform/test-fixtures/plan-count-module-static/main.tf +++ b/terraform/test-fixtures/plan-count-module-static/main.tf @@ -1,6 +1,8 @@ -variable "foo" { default = "3" } +variable "foo" { + default = "3" +} module "child" { - source = "./child" - value = "${var.foo}" + source = "./child" + value = "${var.foo}" } diff --git a/terraform/test-fixtures/plan-module-deadlock/child/main.tf b/terraform/test-fixtures/plan-module-deadlock/child/main.tf index ccee7bfb4..2451bf054 100644 --- a/terraform/test-fixtures/plan-module-deadlock/child/main.tf +++ b/terraform/test-fixtures/plan-module-deadlock/child/main.tf @@ -1,4 +1,7 @@ resource "aws_instance" "foo" { count = "${length("abc")}" - lifecycle { create_before_destroy = true } + + lifecycle { + create_before_destroy = true + } } diff --git a/terraform/test-fixtures/plan-module-provider-inherit-deep/A/main.tf b/terraform/test-fixtures/plan-module-provider-inherit-deep/A/main.tf index 18d807a25..efe683c31 100644 --- a/terraform/test-fixtures/plan-module-provider-inherit-deep/A/main.tf +++ b/terraform/test-fixtures/plan-module-provider-inherit-deep/A/main.tf @@ -1 +1,3 @@ -module "B" { source = "../B" } +module "B" { + source = "../B" +} diff --git a/terraform/test-fixtures/plan-module-provider-inherit-deep/B/main.tf b/terraform/test-fixtures/plan-module-provider-inherit-deep/B/main.tf index 41cd2f9e5..29cba7fc3 100644 --- a/terraform/test-fixtures/plan-module-provider-inherit-deep/B/main.tf +++ b/terraform/test-fixtures/plan-module-provider-inherit-deep/B/main.tf @@ -1 +1,3 @@ -module "C" { source = "../C" } +module "C" { + source = "../C" +} diff --git a/terraform/test-fixtures/plan-module-provider-var/main.tf b/terraform/test-fixtures/plan-module-provider-var/main.tf index 57e8faec5..43675f913 100644 --- a/terraform/test-fixtures/plan-module-provider-var/main.tf +++ b/terraform/test-fixtures/plan-module-provider-var/main.tf @@ -1,6 +1,8 @@ -variable "foo" { default = "bar" } +variable "foo" { + default = "bar" +} module "child" { - source = "./child" - foo = "${var.foo}" + source = "./child" + foo = "${var.foo}" } diff --git a/terraform/test-fixtures/plan-module-var/child/main.tf b/terraform/test-fixtures/plan-module-var/child/main.tf index 7a44647fe..c7b1d283e 100644 --- a/terraform/test-fixtures/plan-module-var/child/main.tf +++ b/terraform/test-fixtures/plan-module-var/child/main.tf @@ -1,7 +1,7 @@ resource "aws_instance" "foo" { - num = "2" + num = "2" } output "num" { - value = "${aws_instance.foo.num}" + value = "${aws_instance.foo.num}" } diff --git a/terraform/test-fixtures/plan-module-var/main.tf b/terraform/test-fixtures/plan-module-var/main.tf index b38f538a2..942bdba92 100644 --- a/terraform/test-fixtures/plan-module-var/main.tf +++ b/terraform/test-fixtures/plan-module-var/main.tf @@ -1,7 +1,7 @@ module "child" { - source = "./child" + source = "./child" } resource "aws_instance" "bar" { - foo = "${module.child.num}" + foo = "${module.child.num}" } diff --git a/terraform/test-fixtures/plan-module-wrong-var-type/inner/main.tf b/terraform/test-fixtures/plan-module-wrong-var-type/inner/main.tf index c7f975a3b..c36aef10c 100644 --- a/terraform/test-fixtures/plan-module-wrong-var-type/inner/main.tf +++ b/terraform/test-fixtures/plan-module-wrong-var-type/inner/main.tf @@ -1,10 +1,13 @@ variable "map_in" { - type = "map" - default = { - us-west-1 = "ami-12345" - us-west-2 = "ami-67890" - } + type = "map" + + default = { + us-west-1 = "ami-12345" + us-west-2 = "ami-67890" + } } // We have to reference it so it isn't pruned -output "output" { value = "${var.map_in}" } +output "output" { + value = "${var.map_in}" +} diff --git a/terraform/test-fixtures/plan-targeted-cross-module/A/main.tf b/terraform/test-fixtures/plan-targeted-cross-module/A/main.tf index f825ecf8a..4c014aa22 100644 --- a/terraform/test-fixtures/plan-targeted-cross-module/A/main.tf +++ b/terraform/test-fixtures/plan-targeted-cross-module/A/main.tf @@ -1,5 +1,7 @@ resource "aws_instance" "foo" { - foo = "bar" + foo = "bar" } -output "value" { value = "${aws_instance.foo.id}" } +output "value" { + value = "${aws_instance.foo.id}" +} diff --git a/terraform/test-fixtures/plan-targeted-module-with-provider/child1/main.tf b/terraform/test-fixtures/plan-targeted-module-with-provider/child1/main.tf index 48bfc9c84..c9aaff5f7 100644 --- a/terraform/test-fixtures/plan-targeted-module-with-provider/child1/main.tf +++ b/terraform/test-fixtures/plan-targeted-module-with-provider/child1/main.tf @@ -1,4 +1,7 @@ variable "key" {} -provider "null" { key = "${var.key}" } + +provider "null" { + key = "${var.key}" +} resource "null_resource" "foo" {} diff --git a/terraform/test-fixtures/plan-targeted-module-with-provider/child2/main.tf b/terraform/test-fixtures/plan-targeted-module-with-provider/child2/main.tf index 48bfc9c84..c9aaff5f7 100644 --- a/terraform/test-fixtures/plan-targeted-module-with-provider/child2/main.tf +++ b/terraform/test-fixtures/plan-targeted-module-with-provider/child2/main.tf @@ -1,4 +1,7 @@ variable "key" {} -provider "null" { key = "${var.key}" } + +provider "null" { + key = "${var.key}" +} resource "null_resource" "foo" {} diff --git a/terraform/test-fixtures/refresh-no-state/main.tf b/terraform/test-fixtures/refresh-no-state/main.tf index 13edd5f5e..76c0f8767 100644 --- a/terraform/test-fixtures/refresh-no-state/main.tf +++ b/terraform/test-fixtures/refresh-no-state/main.tf @@ -1 +1,3 @@ -output "foo" {} +output "foo" { + value = "" +} diff --git a/terraform/test-fixtures/transform-destroy-edge-basic/main.tf b/terraform/test-fixtures/transform-destroy-edge-basic/main.tf index a6a6a5ec4..50f87223a 100644 --- a/terraform/test-fixtures/transform-destroy-edge-basic/main.tf +++ b/terraform/test-fixtures/transform-destroy-edge-basic/main.tf @@ -1,2 +1,5 @@ resource "test" "A" {} -resource "test" "B" { value = "${test.A.value}" } + +resource "test" "B" { + value = "${test.A.value}" +} diff --git a/terraform/test-fixtures/transform-destroy-edge-module/child/main.tf b/terraform/test-fixtures/transform-destroy-edge-module/child/main.tf index cc2f3b7ff..22a0ce4fd 100644 --- a/terraform/test-fixtures/transform-destroy-edge-module/child/main.tf +++ b/terraform/test-fixtures/transform-destroy-edge-module/child/main.tf @@ -1,5 +1,7 @@ resource "aws_instance" "b" { - value = "foo" + value = "foo" } -output "output" { value = "${aws_instance.b.value}" } +output "output" { + value = "${aws_instance.b.value}" +} diff --git a/terraform/test-fixtures/transform-destroy-edge-multi/main.tf b/terraform/test-fixtures/transform-destroy-edge-multi/main.tf index 93e8211ca..632d21318 100644 --- a/terraform/test-fixtures/transform-destroy-edge-multi/main.tf +++ b/terraform/test-fixtures/transform-destroy-edge-multi/main.tf @@ -1,3 +1,9 @@ resource "test" "A" {} -resource "test" "B" { value = "${test.A.value}" } -resource "test" "C" { value = "${test.B.value}" } + +resource "test" "B" { + value = "${test.A.value}" +} + +resource "test" "C" { + value = "${test.B.value}" +} diff --git a/terraform/test-fixtures/transform-flat-config-basic/main.tf b/terraform/test-fixtures/transform-flat-config-basic/main.tf index c588350d4..ffe0916f3 100644 --- a/terraform/test-fixtures/transform-flat-config-basic/main.tf +++ b/terraform/test-fixtures/transform-flat-config-basic/main.tf @@ -1,6 +1,9 @@ resource "aws_instance" "foo" {} -resource "aws_instance" "bar" { value = "${aws_instance.foo.value}" } + +resource "aws_instance" "bar" { + value = "${aws_instance.foo.value}" +} module "child" { - source = "./child" + source = "./child" } diff --git a/terraform/test-fixtures/transform-module-var-basic/child/main.tf b/terraform/test-fixtures/transform-module-var-basic/child/main.tf index 0568aa053..53f3cd731 100644 --- a/terraform/test-fixtures/transform-module-var-basic/child/main.tf +++ b/terraform/test-fixtures/transform-module-var-basic/child/main.tf @@ -1,3 +1,5 @@ variable "value" {} -output "result" { value = "${var.value}" } +output "result" { + value = "${var.value}" +} diff --git a/terraform/test-fixtures/transform-module-var-nested/child/child/main.tf b/terraform/test-fixtures/transform-module-var-nested/child/child/main.tf index 0568aa053..53f3cd731 100644 --- a/terraform/test-fixtures/transform-module-var-nested/child/child/main.tf +++ b/terraform/test-fixtures/transform-module-var-nested/child/child/main.tf @@ -1,3 +1,5 @@ variable "value" {} -output "result" { value = "${var.value}" } +output "result" { + value = "${var.value}" +} diff --git a/terraform/test-fixtures/transform-orphan-count/main.tf b/terraform/test-fixtures/transform-orphan-count/main.tf index 954d7a569..acef373b3 100644 --- a/terraform/test-fixtures/transform-orphan-count/main.tf +++ b/terraform/test-fixtures/transform-orphan-count/main.tf @@ -1 +1,3 @@ -resource "aws_instance" "foo" { count = 3 } +resource "aws_instance" "foo" { + count = 3 +} diff --git a/terraform/test-fixtures/validate-computed-module-var-ref/source/main.tf b/terraform/test-fixtures/validate-computed-module-var-ref/source/main.tf index f923e8080..9aacfb769 100644 --- a/terraform/test-fixtures/validate-computed-module-var-ref/source/main.tf +++ b/terraform/test-fixtures/validate-computed-module-var-ref/source/main.tf @@ -1,3 +1,5 @@ -resource "aws_instance" "source" { } +resource "aws_instance" "source" {} -output "sourceout" { value = "${aws_instance.source.id}" } +output "sourceout" { + value = "${aws_instance.source.id}" +}