Our use case is one where we wish to refactor some existing infrastructure code from having multiple terragrunt files with independent stacks to a single stack that invokes a module that consolidates the prior infrastructure components. Our reason is to support greater promotability of the consolidated component across environments. During the course of this, we do not wish to necessarily change application architecture or the actual cloud resources, only the way we organize our terraform code and invoke it across multiple operational environments: qa, staging (multiple), production (multiple).
I see comments in the code such as this one that suggest that multi-state migration (multiple sources, single target) has been explicitly considered, but either not implemented yet or ruled out by design. I'm not sure which. I also see this comment from @minamijoyo which seems to suggest that this might be just a "not implemented yet" feature:
The current implementation is limited to defining only one migration per file, but how about using a file boundary as a transaction boundary to group multiple migrations as an atomic transaction?
Is it possible to get a feature to serve this use case implemented? Given our desire for atomic migrations involving 3+ terraform state files, it's a blocker for our current use case since we don't wish to break down our code refactor into a series of 2-state partial migrations because of the added operational complexity in rolling it out. We're currently considering simply mimicking the state migration logic and local state manipulations instead of using tfmigrate as-is.
Our use case is one where we wish to refactor some existing infrastructure code from having multiple terragrunt files with independent stacks to a single stack that invokes a module that consolidates the prior infrastructure components. Our reason is to support greater promotability of the consolidated component across environments. During the course of this, we do not wish to necessarily change application architecture or the actual cloud resources, only the way we organize our terraform code and invoke it across multiple operational environments: qa, staging (multiple), production (multiple).
I see comments in the code such as this one that suggest that multi-state migration (multiple sources, single target) has been explicitly considered, but either not implemented yet or ruled out by design. I'm not sure which. I also see this comment from @minamijoyo which seems to suggest that this might be just a "not implemented yet" feature:
Is it possible to get a feature to serve this use case implemented? Given our desire for atomic migrations involving 3+ terraform state files, it's a blocker for our current use case since we don't wish to break down our code refactor into a series of 2-state partial migrations because of the added operational complexity in rolling it out. We're currently considering simply mimicking the state migration logic and local state manipulations instead of using
tfmigrateas-is.