mach-composer-cli
mach-composer-cli copied to clipboard
Support for using saved terraform plan file
We want mach apply to save the generated terraform plan file, and, after manual verification, we want to pass this saved plan file to mach apply so that terraform will execute the verified plan.
See https://www.terraform.io/cli/commands/plan#out-filename
Is this supported by current version? If so, please explain how to do this. If not, please add this feature in a next version.
hi @yo1-markenstein,
This is on the roadmap!
As a workaround we currently use the plan command to run a tfsec validation step in-between, but running apply does not use the initial plan afterwards.
Best, Pim
This is implemented a while ago.
See the documentation for an example of a PR flow that uses tfplan as input for a deployment: https://docs.machcomposer.io/howto/ci/github.html#example