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.
21 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.