terraform/configs/configupgrade/test-fixtures/valid
Martin Atkins 1bb47ab9a5 configs/configupgrade: Preserve comments on items in object exprs
The expression upgrade functionality mostly ignores comments because in
the old language the syntax prevented comments from appearing in the
middle of expressions, but there was one exception: object expressions.

Because HCL 1 used ObjectType both for blocks and for object expressions,
that is the one situation where something we consider to be an expression
could have inline attached comments in the old language.

We migrate these here so we don't lose these comments that don't appear
anywhere else. Other comments get gathered up into a general comments
set maintained inside the analysis object and so will be printed out as
required _between_ expressions, just as they did before.
2019-04-17 07:48:57 -07:00
..
argument-commas configs/configupgrade: Test for removing commas between block arguments 2019-02-20 16:11:14 -08:00
block-as-list-attr configs/configupgrade: Upgrading of simple nested blocks 2018-12-04 11:37:39 -08:00
block-as-list-dynamic configs/configupgrade: Convert block-as-attr to dynamic blocks 2018-12-04 11:37:39 -08:00
block-as-list-dynamic-item configs/configupgrade: Convert block-as-attr to dynamic blocks 2018-12-04 11:37:39 -08:00
block-as-list-dynamic-nested configs/configupgrade: Convert block-as-attr to dynamic blocks 2018-12-04 11:37:39 -08:00
block-as-map-attr configs/configupgrade: Upgrading of simple nested blocks 2018-12-04 11:37:39 -08:00
depends-on configs/configupgrade: Upgrade depends_on in resources and outputs 2018-12-05 10:25:01 -08:00
element-of-set configs/configupgrade: Detect and fix element(...) usage with sets 2019-02-21 09:39:55 -08:00
funcs-replaced configs/configupgrade: Fix up internal HIL conversion functions 2019-02-20 14:01:53 -08:00
hash-of-file lang: New file-hashing functions 2019-01-25 10:18:44 -08:00
heredoc-flush vendor: go get github.com/hashicorp/hcl2@master 2019-03-15 13:55:30 -07:00
heredoc-no-interp configs/configupgrade: upgrade expressions inside heredocs 2019-02-20 12:56:44 -08:00
heredoc-sameline vendor: go get github.com/hashicorp/hcl2@master 2019-03-15 13:55:30 -07:00
heredoc-standard vendor: go get github.com/hashicorp/hcl2@master 2019-03-15 13:55:30 -07:00
ignore-changes-flatmap-colls configs/configupgrade: Silently ignore and trim .% .# in ignore_changes 2019-02-20 15:58:44 -08:00
interp-naked configupgrade: Basic expression formatting 2018-10-16 18:50:29 -07:00
invalid-resource-name configupgrade: fix test (#20863) 2019-03-28 18:00:33 -04:00
lifecycle configs/configupgrade: Upgrade the resource "lifecycle" nested block 2018-12-05 10:25:01 -08:00
list-of-obj-as-block configs/configupgrade: Prefer block syntax for list-of-object attributes 2019-04-01 13:30:24 -07:00
map-attr-as-block configs/configupgrade: Test that map attrs as blocks are fixed 2018-12-04 11:37:39 -08:00
module-source configs/configupgrade: detect invalid resource names and print a TODO (#20856) 2019-03-28 13:48:35 -04:00
nested-exprs-in-hcl configs/configupgrade: Upgrade expressions nested in HCL list/object 2018-12-04 11:37:39 -08:00
noop configs/configupgrade: Preserve comments on items in object exprs 2019-04-17 07:48:57 -07:00
noop-exprs configupgrade: Basic expression formatting 2018-10-16 18:50:29 -07:00
number-literals configs/configupgrade: Normalize number literals to decimal 2019-04-04 18:09:44 -07:00
provider-addrs configs/configupgrade: Upgrade provider addresses 2018-12-05 10:25:01 -08:00
provisioner configs/configupgrade: Default arguments in "connection" blocks 2019-02-22 12:32:56 -08:00
redundant-list config/configupgrade: Test to show that list unwrapping works for sets 2019-02-22 17:40:40 -08:00
relative-module-source configs/configupgrade: detect possible relative module sources (#20646) 2019-03-13 11:17:14 -07:00
rename-json configupgrade: Basic expression formatting 2018-10-16 18:50:29 -07:00
rename-json-conflict configupgrade: Basic expression formatting 2018-10-16 18:50:29 -07:00
resource-count-ref configs/configupgrade: Fix up uses of the .count pseudo-attribute 2019-02-22 16:18:53 -08:00
traversals configs/configupgrade: Fix up references to counted/uncounted resources 2018-12-04 11:37:39 -08:00
variable-type configupgrade: Basic expression formatting 2018-10-16 18:50:29 -07:00