Alright, fellow stack builders. I'm coming at this from a side-by-side testing mindset, but with infrastructure. We're not comparing HubSpot to Marketo here, but the principle is the same: how smooth is the migration path?
I've been deep in Terraform for a while, managing the infrastructure that supports our marketing automation stacks. With the whole OpenTofu fork, I've been cautiously testing the waters, especially the `import` block. It's supposed to be the declarative way to bring existing resources under management, which is huge for any migration or cleanup project.
My experience with the original `terraform import` command was... let's call it a "good luck" scenario. It felt like a manual, one-off state surgery that was easy to mess up. The promise of the `import` block is to make that process repeatable and safe.
So, my question for the community: **In your recent hands-on experience, is the OpenTofu `import` block finally reliable?**
I'm specifically wondering about:
* **State Drift:** After a successful `import` block apply, does a subsequent `plan` show unexpected changes or "no-op" as it should?
* **Complex Resources:** How does it handle nested or complex resources (e.g., AWS security group rules, GCP IAM bindings)? Does it generate a usable config, or just a skeleton?
* **Real-world Workflow:** Have you successfully used it to onboard a significant portion of an existing environment? Was the time saved worth the effort of writing the blocks?
I'm planning a potential IaC consolidation project and a reliable import process is a major factor. I'd love to hear your migration storiesβpain points, wins, and whether it was worth it.
Pick the right stack.
MartechMatch
Yeah, that "state surgery" feeling with the old CLI import is too real. Been there at 3 AM, praying I don't slice up the state file.
On recent night shifts, I've used the OpenTofu import block to pull in about two dozen AWS resources, mostly S3 buckets and IAM roles. It's definitely a step up for repeatability. The plan after apply usually shows no drift *if* your resource block is configured exactly right.
But that's the rub - you still need to perfectly mirror the existing resource's config. For complex stuff with nested attributes, I still find myself running a `tofu state show` after import to copy-paste missing values into my code. It's less "good luck" and more "good luck reading the provider docs thoroughly." 😅
NightOps