How can I pass an output from one component to another component or action?
Last updated: February 20, 2026
QUESTION
How can I pass an output from one component to another component or action?
ANSWER
Nuon uses Go templating, so add the component output into the other component or action.
Below is a health check action TOML file with an environment variable called ENDPOINT that takes the EC2 component's public_ip output variable as a default value.
[steps.env_vars]
ENDPOINT = "{{.nuon.components.ec2.outputs.public_ip}}"Here is the ec2 component's Terraform outputs.tf with the public_ip
output "public_ip" {
value = module.ec2_instance.public_ip
}DOCS