Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow writing output of plan files from terraspace all command #156

Closed
samjsmart opened this issue Nov 22, 2021 · 0 comments · Fixed by #197
Closed

Allow writing output of plan files from terraspace all command #156

samjsmart opened this issue Nov 22, 2021 · 0 comments · Fixed by #197
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@samjsmart
Copy link

samjsmart commented Nov 22, 2021

Summary

Add an --out=<path> option to the terraspace all plan command that will write the plan files from each stack to the specified directory, in the form of <path>/<stack>.plan or <path>/<stack>.json

Motivation

This will be useful within CI pipelines as it allows tooling, such as infracost, to be executed on every stack using the provided output files. Currently this can be achieved by running terraspace plan <stack> --out=<plan path>, however, this method does not leverage Terraspace's dependency resolution or stack discovery, and so each command must be manually added to CI configuration in the correct order. Having the ability to output all plan files will make integration with other Terraform tooling much easier.

Guide-level explanation

Usage:
  terraspace all plan

Options:
o, [--out=OUT]                              # Write the output(s) to path
y, [--yes], [--no-yes]                     # auto approve all batch commands
      [--exit-on-fail], [--no-exit-on-fail]  # whether or not to exit when one of the batch commands fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants