Closed arthurio closed 5 years ago
Hello @arthurio, could you try to delete the state file and re-import your resources?
Hello @arthurio, If despite re-import your resources the problem continues can you share us your Terraform configuration omitting sensible data?
I used terraform state rm ...
to remove all my states and re-imported the resources. Everything worked except the mongodbatlas_project_ip_whitelist
. The doc's example is unclear... terraform import mongodbatlas_project_ip_whitelist.test cHJvamVjdF9pZA==:NWNmNWE0NWE5Y2NmNjQwMGU2MDk4MWI2-ZW50cmllcw==
so project_id:xxxx
encoded in base64? I tried but it gave me an error: Error: error getting project IP whitelist information: whiteListEntry is invalid because must be set
I tried:
base64(project_id):base64(xxxxx)
base64(project_id):base64(10.0.0.0/16)
base64(xxxxx):base64(10.0.0.0/16)
Where xxxxx
is my actual project id but no luck...
The problem with whitelist is resolved on issue 42 in mongo repository (https://github.com/mongodb/terraform-provider-mongodbatlas/pull/42) but is not merged yet here, we are waiting for that as soon as posible.
And where can I get or generate the id for import (cHJvamVjdF9pZA==:NWNmNWE0NWE5Y2NmNjQwMGU2MDk4MWI2-ZW50cmllcw==
)?
Ohh I think you pointed to the wrong PR... https://github.com/mongodb/terraform-provider-mongodbatlas/pull/39 is the one :)
I’m sorry for that, I misunderstood because both pr pointed to the withelist resource.
Ok, so after using your branch, I was able to import back my resources. However, I had to manually tweak the state to:
project_id = null
with the actual project id in the mongodbatlas_project_ip_whitelist
.container_id = 5cb99c87ff7a25deREDACTED
with the generated id (Y29udGFpbmVyX2lk:NWNiOTljODdmZjdhMjVkZTQyNmMyMzI3-cHJvREDACTED==:NWM5ZGMyNzc1NTM4NTU4OWQREDACTED
) in mongodbatlas_network_peering
.Hope this helps.
Hi!
I started creating my resources using the mongodb repo, I was on commit https://github.com/terraform-providers/terraform-provider-mongodbatlas/commit/2b90e034de74f0fcf864c950c53a9233d687182c. I switched to this "official" provider and now I'm getting the following when trying to plan:
Did you make breaking changes? Should I delete my state and re-import my resources?