Hacker News new | ask | show | jobs
by sevagh 3292 days ago
>Terraform state surgery

Did you try to use `terraform state mv`? I've found that command useful (albeit for much less than thousands of resources).

1 comments

I don't think it would work in this case, as the `ebs_block_device` block isn't a resource. In fact, the TF state doesn't even have the volume IDs for them!

An alternative to doing this was `terraform import` on all the volumes, then defining attachments, and hoping it all worked when you run `terraform plan`. I don't 100% remember now why we didn't do that.