Hi - I’m working on building a CI pipeline that runs a speculative plan as part of my team’s pull request workflow. I’m having the plan output displayed in a Github comment.
I’ve been experimenting with the tfci workflow tool, as well as using the API directly, and the CLI. They each have their advantages. But I really like how the plan output is formatted when executed from the CLI. Using the CLI, the output displays each resource with +, -, ~ signs to indicate what’s going to happen within the change.
On the other hand, the API plan output (using the ‘Retrieve the JSON execution plan’) is far less easy to interpret. Within this API output JSON, there is a ‘resource_changes’ array that contains all the information about each changing resource, including a ‘before’ and ‘after’ section. This JSON does not contain the +,-,~ signs to easily view what’s about to change.
Am I missing something? Is there a way to get that CLI-style plan output while using the API? Or is the recommendation that I should just ask my users to navigate from the PR to TF Cloud run page to see the details about what exactly is changing within the resource?