mach-composer-cli icon indicating copy to clipboard operation
mach-composer-cli copied to clipboard

Support for using saved terraform plan file

Open yo1-markenstein opened this issue 3 years ago • 1 comments

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.

yo1-markenstein avatar Mar 22 '22 15:03 yo1-markenstein

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

pimvernooij avatar Mar 28 '22 10:03 pimvernooij

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

pimvernooij avatar Jan 16 '23 09:01 pimvernooij