Problem: Terraform doesn't play nicely with pre-existing infrastructure.
Solution: Officially there isn't one - but here's a work-around that does the trick.
- Declare a new, temporary resource in your Terraform plan that is nearly identical to the extant resource.
Apply
the plan, thus instantiating the temporary "twinned" resource and building a state file.