-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
terraform import for_each works only for some resources #23295
Comments
|
Same here:
Terraform file:
So it is possible to create users and delete from state, but if I need to import then, it's impossible, causing a lot of problems. |
for anyone hitting this from Google, I've been pulling state and modifying the json to fix this based on the referenced issue comments... this has been a decent work around for the last month |
@so0k I tried to replicate this, but was unable to do so on either 0.12.12 or on master -- I focused on creating the eip resources, as that's where you had the issue. These are the steps I followed:
And I did not run into the issue you described. However, I do have a suspicion that the work involved in fixing #23077 (currently in master) might impact this as well (in hopefully a positive way), should you still be running into this. As to @pexaorj, the error message you have is correct, if you are not passing two arguments to |
good point, I've updated to 0.12.12since as well so perhaps the issue is fixed, I will try again and update this ticket status |
Hello again! We didn't hear back from you, so I'm going to close this in the hope that a previous response gave you the information you needed. If not, please do feel free to re-open this and leave another comment with the information my human friends requested above. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I successfully imported 12 aws_subnet resources, and 1 aws_eip resource, but the 2nd aws_eip resource fails...
after import of first one, plan looks good …
but 2nd one fails 😞
it’s strange because I managed to import all 12 subnets without issues
Terraform Version
Terraform Configuration Files
Subnets config:
subnets module is called with (see var.az defined below):
EIPs config
Debug Output
will provide when requested
Expected Behavior
aws_eip imports just like aws_subnets
Actual Behavior
aws_subnets import successfully while aws_eip import fails
Steps to Reproduce
terraform init
terraform plan
References
The text was updated successfully, but these errors were encountered: