Closed ZdenekPesek closed 2 months ago
@ZdenekPesek Thanks for reaching out. We have just released sub-resources with AzApi provider. Please can you test again?
@chinthakaru thank you for a prompt reply.
I have re-tested, but error is still the same. Not sure if the sub-resources needs to be propagated somewhere as I still see I am using azapi v1.13.1
and same module version v0.1.3
.
@ZdenekPesek I have tested your example code on my environment. it worked without any issues. Please can you share your full configuration files here ?
@chinthakaru sorry, my bad. I just realized I need to change the module ref to main
. And it works! :)
When I can expect it to be released?
@ZdenekPesek Thanks for the update. I'll make a release this week.
Since this issue has been resolved, I'll close this Issue.
Thank you. Very appreciated!
@chinthakaru sorry to bother again, but situation got quite weird after all.
Container which I was creating by terraform, delete the state and tried to import back works quite well (as a reproducer). But container which was created manually can't still be imported (real life scenario)
╷
│ Error: Unsupported attribute
│
│ on .terraform/modules/storage_account/outputs.tf line 8, in output "containers":
│ 8: public_access = container.body.properties.publicAccess
│ ├────────────────
│ │ container.body is "{\"properties\":{\"metadata\":null,\"publicAccess\":\"None\"}}"
│
│ Can't access attributes on a primitive-typed value (string).
Seems like jsondecode
is still needed?
Sorry I did not tested properly both scenarios, I thought it will behave same.
@chinthakaru my bad for a second time :) I needed to re-import the storage account from scratch and then also manually created container is able to be imported. Sorry for the false alarm :)
Is there an existing issue for this?
Greenfield/Brownfield provisioning
greenfield
Terraform Version
v1.8.5
Module Version
v0.1.3
AzureRM Provider Version
azapi_resource v1.9.0, v1.13.1
Affected Resource(s)/Data Source(s)
azapi_resource
Terraform Configuration Files
tfvars variables values
Debug Output/Panic Output
Expected Behaviour
import succeeds
Actual Behaviour
Import fails.
I tested it with direct
azapi
resource it works with no issueSteps to Reproduce
No response
Important Factoids
No response
References
No response