Add before-plan and after-plan and similar hooks for atmos terraform workflows
Have a question? Please checkout our Slack Community or visit our Slack Archive.
Describe the Feature
Add optional workflow commands to run e.g. between plan and apply stages
For instance, it would be nice to add an opa hook to the verify the planfile if there is a opa/ directory within the component. This would help a lot for local atmos runs or if spacelift is not used.
Closed by https://github.com/cloudposse/atmos/pull/207 by @aknysh
Ah so #207 did allow using opa here but did not expose hooks for after-plan, before-plan, etc so I will re-open.
Another use-case came up if we wanted to apply a specific patch to an upstream module without changing it. It would be nice to slip that in after terraform init and before terraform plan. See https://github.com/hashicorp/terraform/issues/27525#issuecomment-1288016368.
The previous use case was to use opa on the hcl where as #207 adds opa for the atmos yaml itself.