mirror of https://github.com/hashicorp/terraform
command/show: fixing bugs in modulecalls (#20513)
* command/show: fixing bugs in modulecalls jsonconfig and jsonplan both had subtle bugs with the logic for marshaling module calls that only showed up when multiple modules were referenced. This PR fixes those bugs and extends the existing tests to include multiple modules. * sort all the things, mostly for testspull/20553/head
parent
21f6e3dffd
commit
c4151b7c7c
@ -0,0 +1,11 @@
|
||||
variable "test_var" {
|
||||
default = "bar-var"
|
||||
}
|
||||
|
||||
output "test" {
|
||||
value = var.test_var
|
||||
}
|
||||
|
||||
resource "test_instance" "test" {
|
||||
ami = var.test_var
|
||||
}
|
||||
@ -1,9 +1,13 @@
|
||||
module "module_test" {
|
||||
module "module_test_foo" {
|
||||
source = "./foo"
|
||||
test_var = "baz"
|
||||
}
|
||||
|
||||
module "module_test_bar" {
|
||||
source = "./bar"
|
||||
}
|
||||
|
||||
output "test" {
|
||||
value = module.module_test.test
|
||||
depends_on = [module.module_test]
|
||||
value = module.module_test_foo.test
|
||||
depends_on = [module.module_test_foo]
|
||||
}
|
||||
|
||||
Loading…
Reference in new issue