New Terraform Tutorial: Terraform Outputs
Learn how to output data about your infrastructure.
HashiCorp Terraform output values export data about your infrastructure resources, like IP addresses, regions, and more. You can use this data to configure other parts of your infrastructure with automation tools, or as a data source for another Terraform workspace. Outputs are also necessary to import data from child modules into your root module.
Follow our new tutorial, Output Data From Terraform, to use Terraofrm outputs with real infrastructure. Here are some of the highlights of what you’ll learn.
» Use Outputs to Export Configuration Data
Below is a code example showing how you define output blocks to export structured data from your Terraform configuration.
When you apply this configuration, Terraform will print out these values to the command line. You can also use outputs to connect Terraform configuration, either through the use of modules, or separate workspaces.
» Redact Sensitive Outputs
Sometimes you need to share data between Terraform modules or workspaces that includes sensitive information such as usernames and passwords. Terraform outputs support the sensitive
flag, which will redact these values in console output and log messages.
When Terraform prints out these values, it will redact them as <sensitive>
.
Try the new hands-on tutorial: Output Data From Terraform.
Sign up for the latest HashiCorp news
More blog posts like this one
Fix the developers vs. security conflict by shifting further left
Resolve the friction between dev and security teams with platform-led workflows that make cloud security seamless and scalable.
HashiCorp at AWS re:Invent: Your blueprint to cloud success
If you’re attending AWS re:Invent in Las Vegas, Dec. 2 - Dec. 6th, visit us for breakout sessions, expert talks, and product demos to learn how to take a unified approach to Infrastructure and Security Lifecycle Management.
Speed up app delivery with automated cancellation of plan-only Terraform runs
Automatic cancellation of plan-only runs allows customers to easily cancel any unfinished runs for outdated commits to speed up application delivery.