Oleg Gumbar
03/31/2024, 11:02 PMatlantis plan creates plan file for module A which is actual, but plan file for module B has outdated outputs of module A and atlantis apply will lead to undesirable behaviour
Possible solutions are:
1. to accept such behaviour and keep in mind that modules need to be orchestrated by user taking it into account. Make changes for modules group A, get request approved, run apply , make changes for modules group B, get approved, run apply and so on. But it’s silly, requires to keep all context in a head and sometimes a lot of efforts to setup new infrastructure unit where there can be many layers of infra
2. declare workflow where atlantis apply will do will do terragrunt plan and then terragrunt apply, but such approach is also no-go, because atlantis apply doesn’t guarantee correctness, because there may arise a situation where another changes will be applied, not those which were planned during atlantis plan
I’m wondering if someone has encountered with that and are there other options (for example possibility to apply execution order group separately and prevention of apply or execution order group if it wasn’t planned with applied dependencies) which may help? ThanksPePe Amengual
04/01/2024, 1:29 AMPePe Amengual
04/01/2024, 1:29 AMPePe Amengual
04/01/2024, 1:30 AMPePe Amengual
04/01/2024, 1:30 AMOleg Gumbar
04/01/2024, 1:55 AMatlantis plan where I have changes in module A from execution group 1 and module B from execution group 2 - atlantis plan executes all modules in order, but in resulting plan file module B has variables from outputs of unapplied module A, because module A should be applied before module B planned. Also in this case module B apply not necessarily ends up with failure - it applies normally, but with outputs which it shouldn’t be applied @PePe AmengualOleg Gumbar
04/01/2024, 1:58 AMPePe Amengual
04/01/2024, 2:09 AMStas Ostrovskyi
04/01/2024, 8:28 AMdepends_on?Gabriel Martinez
04/01/2024, 9:44 AMOleg Gumbar
04/01/2024, 2:54 PMyou can always add@Stas Ostrovskyi It could be possible to add support ofdepends_on
depends_on to terragrunt-atlantis-config, but depends_on should prevent planning module if its dependencies weren’t applied to resolve issue (currently it prevents applying only from what I see in docs)
@Gabriel Martinez yes, and sometimes it breaks thingsPePe Amengual
04/01/2024, 3:36 PMOleg Gumbar
04/01/2024, 6:56 PMPePe Amengual
04/01/2024, 6:59 PMPePe Amengual
04/01/2024, 7:00 PMOleg Gumbar
04/01/2024, 7:10 PMit actually does not but enforces the relationship so you change the development flow around itHm… Where could I find out more about such approach?
PePe Amengual
04/01/2024, 7:12 PMPePe Amengual
04/01/2024, 7:12 PM