We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to list outputs from the state file and use the values downstream?
main.tf
... output "instance_ips" { value = aws_instance.web.*.public_ip } output "lb_address" { value = aws_alb.web.public_dns } output "password" { sensitive = true value = var.secret_password }
Jenkinsfile
Jenkinsfile.init(this) def validate = new TerraformValidateStage() def deployUat = new TerraformEnvironmentStage("uat") validate.then(deployUat).build() // proposed def outputs = deployUat.getOutputs() echo outputs echo outputs["lb_address"]
$ terraform output instance_ips = [ "54.43.114.12", "52.122.13.4", "52.4.116.53" ] lb_address = "my-app-alb-1657023003.us-east-1.elb.amazonaws.com" password = <sensitive>
The terraform output command is used to extract the value of an output variable from the state file.
terraform output
https://www.terraform.io/cli/commands/output
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there a way to list outputs from the state file and use the values downstream?
Example
main.tf
Jenkinsfile
References
https://www.terraform.io/cli/commands/output
The text was updated successfully, but these errors were encountered: