Hi, guys
Terraform v0.13.6
I have problem with accessing deeply defined output variable.
../terraform-modules/vsphere_server/output.tf
output "server" {
value = vsphere_virtual_machine.server
}
../terraform-modules/vsphere_backend/bs.tf
module "bs" {
for_each = var.backup_server
source = "../vsphere_server"
}
../terraform-modules/vsphere_backend/output.tf
output "bs" {
value = module.bs
}
output "ds" {
value = module.ds
}
output "hv" {
value = module.hv
}
./main.tf
module "vsphere" {
source = "../terraform-modules/vsphere_backend"
}
Here is PROBLEM can’t read module.vsphere
./main.tf
module "cloud_configure" {
source = "../terraform-modules/cloud_configuration"
cloud_backend = module.vsphere
}
But in state all fine :
"module": "module.vsphere.module.bs[\"tfbs11is\"]",
"mode": "managed",
"type": "vsphere_virtual_machine",
"name": "server",
"provider": "provider[\"registry.terraform.io/hashicorp/vsphere\"]",
"instances": [
And output fine too:
output "vsphere" {
value = module.vsphere
}
vsphere = {
"bs" = {
"tfbs11is" = {
"server" = {
...
}
}
}
"ds" = {}
"hv" = {}
}