[Terraform] Print output values as JSON

Created on November 30, 2026

You can use the -json option to print Terraform's root module outputs from the current state in JSON format.

terraform output -json

The JSON makes the output values available to scripts. It also includes values marked sensitive, so handle the result accordingly.

Reference

Terraform