Closed NeckBeardPrince closed 7 years ago
Assuming you used this a module you will need to add outputs yourself. I can't find it right now but somewhere in the TF docs it mentions that outputs from the top level will only be the ones you define with an output {}
block yourself.
module "vpc" { ... }
output "vpc_id" {
value = "${module.vpc.vpc_id}"
}
The docs for modules have an example that shows this behavior:
https://www.terraform.io/docs/modules/create.html Let's add a variable and an output to our child module.
variable "memory" {} output "received" { value = "${var.memory}" }
This will create a required variable, memory, and then an output, received, that will be the value of the memory variable.
You can then configure the module and use the output like so:
module "child" { source = "./child" memory = "1G" } output "child_memory" { value = "${module.child.received}" }
@NeckBeardPrince: Do you face still face issues with using modules?
@NeckBeardPrince This is a Terraform limitation, which may or may not be by design - Module outputs are not displayed as an output when running a terraform apply
however they can be used to pass to other modules, via "${module.vpc.vpc_id}"
as an example, such as @ashb said.
Not sure who maintains this repo.. but @phinze @antonbabenko this can probably be closed.
Nothing in the output.