You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for filing the issue. The first error is only due to a typo in the command itself, you are passing the number 0 as the for_each key, but keys can only be strings. Quoting the string will avoid the error: 'module.m["0"].aws_sns_topic.t'
The second error however does look like a bug. In essence it's another form of #27934, but since it only manifests in nested modules, we can leave this open as a separate distinct problem for now.
thank you for your quick response.
In fact both "errors" belonged to the same block.
I tried your quotation and it didn't help.
Looking forward to see #27934 fixed (and derivatives).
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.
Terraform Version
Terraform Configuration Files
https://github.com/applike-ss/tf-import-issue
Debug Output
https://gist.github.com/applike-ss/060f787190d29b707c06a0efccecdaa4
Expected Behavior
resource should be importable, because the for_each does not matter for the resource
Actual Behavior
resource was prepared to import, but import failed with
Invalid for_each argument
anddata.null_data_source.f will be known only after apply
Steps to Reproduce
terraform init
terraform import 'module.m[0].aws_sns_topic.t' arn:aws:sns:eu-central-1:123456789012:my-topic
Additional Context
References
The text was updated successfully, but these errors were encountered: