sebastian wth

04/18/2023, 12:29 AM
hi folks. i work in an env where we manage other teams environments in terraform/atlantis. however, as the env continues to grow i find many people are not ensuring a clean terraform plan/apply in all places that the tf code is used (terraform workspaces and shared terraform modules), before the code is merged in. a few questions. I'd like to: 1. allow people to run tf plan and apply in atlantis as usual. however, I don't want to run plan and apply everytime there is a new commit. as this would be too slow. 2. I would like that the user must get a clean plan ( 0 changes) before they can merge their code in, any tf worksapce where their code is used. including shared tf modules that are changed. 3. Is there a way to easily dynamically determine which tf workspaces needs a tf plan based on the files that have changed? (terraform modules or terraform workspace that is used by multiple AWS envs) i'm curious if there is a built in way to handle these or a well known project. i can envision a way to do this with custom workflows, but of course, preference would be to re-use something. also if there are better ways to handle what i'm trying to do. i'd appreciate it. ty.