Anyone have experience with `tfmigrate` <https://...
# atmos
e
Anyone have experience with
tfmigrate
https://github.com/cloudposse/atmos/pull/2534 Feedback welcome on this proposed enhancement to Atmos. This does a few things 1. introduces a new
atmos terraform migrate
command that calls
tfmigrate
2. supports lifecycle hooks, so these can run automatically 3. supports passing your already configured backend for terraform to tfmigrate for idempotent migration Why? Ever run into errors like this because a provider was deleted from the state? Migrations can help with that.
Copy code
Error: failed to read provider configuration schema for <http://registry.opentofu.org/cloudposse/template|registry.opentofu.org/cloudposse/template>: failed to instantiate provider "<http://registry.opentofu.org/cloudposse/template|registry.opentofu.org/cloudposse/template>" to obtain schema: unavailable provider "<http://registry.opentofu.org/cloudposse/template|registry.opentofu.org/cloudposse/template>"
@RB this looks like something you've asked for before: how to do migrations
j
I know I've had struggles with this when providers run on different architectures
t
Similar struggles when we add a new provider to a component on a feature branch and someone else is doing parallel development on something unrelated in a different feature branch; the unrelated feature branch pipeline still runs atmos and since it doesn't have the new provider, it starts throwing errors during the atmos run.
r
i think we used some clever
import
block with a
for_each
so we can import via atmos yaml
a
clever
import
blocks work
also, I've seen people adding a variable
imports
, then define it in atmos stacks, then in terraform/tofu code check for the var and iterate in HCL