Do we have a way of doing terraform state migratio...
# atmos
r
Do we have a way of doing terraform state migrations per component-stack slug yet ? Ideally, we’d like to do this in a
<http://migrations.tf|migrations.tf>
style hcl but do it per component-stack so
<http://migrations-redis-banana-ue1-dev.tf|migrations-redis-banana-ue1-dev.tf>
won’t be applied to
redis-banana-ue2-prod
e
Depending on what you want to do, there could be a clever way.
With this, you can generate import blocks. So a new component instance could import the resources from the previous state.
Atmos itself doesn't include any ability to migrate state. Wouldn't be opposed to it, but if you could write up a PRD for how that would work, we could consider it.
r
interesting, generating files would be one way to do it, hmmm. Is this a paved path already or would i be blazing a trail ? 😄
if i did want to propose a PRD, how would i go about doing it ?
e
You'd be blazing a trail. In general, code generation is for escape hatches.
😬 1
check the
docs/prd
folder for all of our current PRDs based on the features that we've introduced into Atmos.
👀 1
Use that as reference and propose how it would work.
Bear in mind, any implementation should not be opinionated to just S3, if possible. Because more and more adoption is spanning multiple cloud providers. Any solution would hopefully also be extensible, so that a similar approach could be implemented for GCP and Azure object storage. Not suggesting cross-cloud portability, but within a given backend provider, designing this so it works with Terraform import-export essentially.