Can the output in terraform be saved locally on my system as a .json file. I need to know if this is possible as this .json file will be used by spot hence why I need to generate it.

2

1 Answer

Run this after you apply to get the outputs as JSON:

terraform show -json > output.json 

The Terraform Command: show (JSON Output) section in the Terraform documentation explains this further.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.