From 21d80a26ea68d24dd5cea5eb2ade7d0217a277c0 Mon Sep 17 00:00:00 2001 From: Alisdair McDiarmid Date: Wed, 18 Nov 2020 11:59:10 -0500 Subject: [PATCH] command: Fix fmt to preserve blank block labels --- command/testdata/fmt/general_in.tf | 3 +++ command/testdata/fmt/general_out.tf | 3 +++ go.mod | 2 +- go.sum | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/command/testdata/fmt/general_in.tf b/command/testdata/fmt/general_in.tf index 44432f973..0ee143731 100644 --- a/command/testdata/fmt/general_in.tf +++ b/command/testdata/fmt/general_in.tf @@ -39,3 +39,6 @@ resource "foo_instance" /* ... */ "baz" { thingy = "${var.instance_type}" } } + + provider "" { +} diff --git a/command/testdata/fmt/general_out.tf b/command/testdata/fmt/general_out.tf index 4b1bc489b..974646ebd 100644 --- a/command/testdata/fmt/general_out.tf +++ b/command/testdata/fmt/general_out.tf @@ -39,3 +39,6 @@ resource "foo_instance" "baz" { thingy = var.instance_type } } + +provider "" { +} diff --git a/go.mod b/go.mod index f1e73bb5d..7aaabe1a1 100644 --- a/go.mod +++ b/go.mod @@ -64,7 +64,7 @@ require ( github.com/hashicorp/go-uuid v1.0.1 github.com/hashicorp/go-version v1.2.0 github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f - github.com/hashicorp/hcl/v2 v2.7.0 + github.com/hashicorp/hcl/v2 v2.7.1 github.com/hashicorp/memberlist v0.1.0 // indirect github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb // indirect github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7 diff --git a/go.sum b/go.sum index d22a19900..091e4c73e 100644 --- a/go.sum +++ b/go.sum @@ -344,6 +344,8 @@ github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh github.com/hashicorp/hcl/v2 v2.0.0/go.mod h1:oVVDG71tEinNGYCxinCYadcmKU9bglqW9pV3txagJ90= github.com/hashicorp/hcl/v2 v2.7.0 h1:IU8qz5UzZ1po3M1D9/Kq6S5zbDGVfI9bnzmC1ogKKmI= github.com/hashicorp/hcl/v2 v2.7.0/go.mod h1:bQTN5mpo+jewjJgh8jr0JUguIi7qPHUF6yIfAEN3jqY= +github.com/hashicorp/hcl/v2 v2.7.1 h1:eZWfKEO93WyE4OnZSD5LVy70YHDV/mmQ49gpKDLpDVM= +github.com/hashicorp/hcl/v2 v2.7.1/go.mod h1:bQTN5mpo+jewjJgh8jr0JUguIi7qPHUF6yIfAEN3jqY= github.com/hashicorp/memberlist v0.1.0 h1:qSsCiC0WYD39lbSitKNt40e30uorm2Ss/d4JGU1hzH8= github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE= github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb h1:ZbgmOQt8DOg796figP87/EFCVx2v2h9yRvwHF/zceX4=