atmos icon indicating copy to clipboard operation
atmos copied to clipboard

Add before-plan and after-plan and similar hooks for atmos terraform workflows

Open nitrocode opened this issue 3 years ago • 2 comments

Have a question? Please checkout our Slack Community or visit our Slack Archive.

Slack Community

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.

nitrocode avatar Jun 14 '22 17:06 nitrocode

Closed by https://github.com/cloudposse/atmos/pull/207 by @aknysh

nitrocode avatar Oct 03 '22 13:10 nitrocode

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.

nitrocode avatar Oct 23 '22 20:10 nitrocode