Closed raswinraaj closed 1 year ago
This was working fine until v2.88.0. The issue has started appearing since 2.90.0
The panic was caused by type cast for request.representation.example.value
.
According to rest-api spec, the value field could be a string or an object.
But I have not used request.representation.example.value
in my code at all.
Hi @raswinraaj , the whole request
argument is "Computed"(https://github.com/hashicorp/terraform-provider-azurerm/blob/main/internal/services/apimanagement/api_management_api_operation_resource.go#L66), which means it could be modified by the Azure service side. I think the original code is not aware of the ambiguous type of this argument, it could be a string or an object represented by a map. I'm working on a patch for this issue and the tests for this api management resource are really slow, so please hold on a moment. Thanks for your patience!
Thanks for taking the time to submit this issue. It looks like this has been resolved as of #14848. As such, I am going to mark this issue as closed.
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.
Community Note
Terraform (and AzureRM Provider) Version
terraform version : v1.0.1 azurerm version : v2.91.0
Affected Resource(s)
azurerm_api_management_api_operation
azurerm_api_management_api_operation_policy
Terraform Configuration Files
Debug Output
https://gist.github.com/raswinraaj/d1b0bdfbe382142625529e5013eba499
Panic Output
Expected Behaviour
Create Policy on the API operation
Actual Behaviour
The Operation gets created in the APIM even though it throws an error on terraform cli. But the policy creation fails.
Steps to Reproduce
terraform apply
Important Factoids
References
0000