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
The plan and subsequent apply should succeed instead of erroring out. Running against Terraform 1.8.3 succeeds.
Actual Behavior
tofu plan errors out like this:
╷
│ Error: Invalid import address expression
│
│ on cdk.tf.json line 19, in import[0]:
│ 19: "to": "azurerm_storage_account.storageAccount"
│
│ Import address must be a reference to a resource's address, and only allows for indexing with dynamic keys. For example: module.my_module[expression1].aws_s3_bucket.my_buckets[expression2] for resources inside of modules, or simply
│ aws_s3_bucket.my_bucket for a resource in the root module
Hi @aherbst-broad, and thank you for reporting this bug.
I managed to reproduce it using JSON files, it looks like we don't parse the to value correctly. The same configuration in TF files is working correctly.
We'll start working on a fix and update you when we are done.
Thank you again for reporting this!
Evi1Pumpkin
added
accepted
This issue has been accepted for implementation.
and removed
pending-decision
This issue has not been accepted for implementation nor rejected. It's still open to discussion.
labels
May 20, 2024
OpenTofu Version
OpenTofu Configuration Files
Debug Output
https://gist.github.com/aherbst-broad/4e7730390be12825dfcbac95c70f52c2
Expected Behavior
The plan and subsequent apply should succeed instead of erroring out. Running against Terraform 1.8.3 succeeds.
Actual Behavior
tofu plan
errors out like this:Steps to Reproduce
tofu init
tofu plan
Additional Context
No response
References
May be related to this commit
The text was updated successfully, but these errors were encountered: