terraform/command/format
Kristin Laemmert 92f427779d
command/show: fix issue with show and aliased provider (#23848)
The formatter in `command/format/state.go`, when formatting a resource
with an aliased provider, was looking for a schema with the alias (ie,
test.foo), but the schemas are only listed by provider type (test).
Update the state formatter to lookup schemas by provider type only.

Some of the show tests (and a couple others) were not properly cleaning
up the created tmpdirs, so I fixed those. Also, the show tests are using
a statefile named `state.tfstate`, but were not passing that path to the
show command, so we were getting some false positives (a `show` command
that returns `no state` exits 0).

Fixes #21462
2020-01-13 15:10:00 -05:00
..
diagnostic.go command: New -compact-warnings option 2019-12-10 11:53:14 -08:00
diagnostic_test.go command: New -compact-warnings option 2019-12-10 11:53:14 -08:00
diff.go Don't inspect an empty set, return false 2019-12-05 16:00:19 -05:00
diff_test.go addrs: replace "Type string" with "Type Provider" in ProviderConfig 2019-12-06 08:00:18 -05:00
format.go command/format: a package for formatting plans/state for output 2017-01-26 14:33:49 -08:00
object_id.go command: Reinstate object ids in the UIHook progress logs 2018-10-16 19:14:11 -07:00
object_id_test.go Updates after running `make fmt` with Go v1.11.1 2018-10-17 14:11:08 -07:00
state.go command/show: fix issue with show and aliased provider (#23848) 2020-01-13 15:10:00 -05:00
state_test.go addrs: replace "Type string" with "Type Provider" in ProviderConfig 2019-12-06 08:00:18 -05:00