Ad space (banner)
AD

Got the fundamentals? A structured Terraform course is a fast way to level up.

Find Terraform courses on Udemy

Affiliate link. Costs you nothing extra.

Lesson 17 / 37

What Are Outputs?

Outputs expose values from your configuration — an IP address, a bucket name — so you or another system can use them afterwards.

You declare them with output "name" { value = ... }.

An output for the instance's public IP means you can read the address after apply without hunting for it in the console.

A common stumble is outputting something sensitive and having it printed to the terminal and into CI logs. Mark those outputs sensitive.

In real work, outputs pass values between modules and feed deployment scripts that need to know where things ended up.

Terraform
Try it (type this into the pseudo terminal)
terraform output

🧑‍💻 You can type this command into the Terraform pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)