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
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.
│ Error: creating Deployment (Subscription: "xxx-xxx-xxx-xxx-xxx"
│ Resource Group Name: "sb-example-rg"
│ Account Name: "sb-example-ca"
│ Deployment Name: "sb-example-cd"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: InvalidRequestContent: The request content was invalid and could not be deserialized.
│
│ with azurerm_cognitive_deployment.example,
│ on main.tf line 27, in resource "azurerm_cognitive_deployment""example":
│ 27: resource "azurerm_cognitive_deployment""example" {
│
│ creating Deployment (Subscription: "xxx-xxx-xxx-xxx-xxx"
│ Resource Group Name: "sb-example-rg"
│ Account Name: "sb-example-ca"
│ Deployment Name: "sb-example-cd"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: InvalidRequestContent: The request content was invalid and could not be deserialized.
---
2024-12-23T16:03:14.244-0800 [DEBUG] provider.terraform-provider-azurerm_v4.14.0_x5.exe: {"properties":{"model":{"format":"OpenAI","name":"text-embedding-ada-002"},"versionUpgradeOption":"OnceNewDefaultVersionAvailable"},"sku":{"capacity":1,"name":"Standard","tier":"Standard"}}
2024-12-23T16:03:14.244-0800 [DEBUG] provider.terraform-provider-azurerm_v4.14.0_x5.exe: [DEBUG] PUT https://management.azure.com/subscriptions/xxx-xxx-xxx-xxx-xxx/resourceGroups/sb-example-rg/providers/Microsoft.CognitiveServices/accounts/sb-example-ca/deployments/sb-example-cd?api-version=2024-10-01
2024-12-23T16:03:14.711-0800 [DEBUG] provider.terraform-provider-azurerm_v4.14.0_x5.exe: [DEBUG] AzureRM Response for https://management.azure.com/subscriptions/xxx-xxx-xxx-xxx-xxx/resourceGroups/sb-example-rg/providers/Microsoft.CognitiveServices/accounts/sb-example-ca/deployments/sb-example-cd?api-version=2024-10-01:
2024-12-23T16:03:14.711-0800 [DEBUG] provider.terraform-provider-azurerm_v4.14.0_x5.exe: HTTP/2.0 400 Bad Request
Expected Behaviour
I would expect that the azurerm_cognitive_deployment to be successful and NOT send the tier property in the API request as its not supported on PUT operations.
The CREATE succeeds when the tier attribute is removed from configuration
Actual Behaviour
The tier property is sent in the API request on create (PUT) operations, which is not supported
Hi @stuartin, thank you for bringing this to our attention. As mentioned here, it is optional to specify the tier property in azurerm_cognitive_deployment. Therefore, as you suggested, removing the tier property from the configuration will resolve the issue.
Plus, according to the document, you don't need to specify the tier in the SKU block if there's only one tier. But if there are multiple tiers, we still need to include this property. So, removing it doesn't really make sense.
Thanks @liuwuliuyun.
I guess the terraform docs were a little unclear that the tier prop should only be specified if there are multiple tier's available in the SKU and if there is only one it should be excluded completely otherwise the PUT requests will fail.
I tried to find an example to test and validate this, but came up dry.
Not sure if you would like to update the variable description, otherwise feel free to close this off.
Is there an existing issue for this?
Community Note
Terraform Version
1.10.2
AzureRM Provider Version
4.14.0
Affected Resource(s)/Data Source(s)
azurerm_cognitive_deployment
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
I would expect that the
azurerm_cognitive_deployment
to be successful and NOT send thetier
property in the API request as its not supported on PUT operations.The CREATE succeeds when the
tier
attribute is removed from configurationActual Behaviour
The
tier
property is sent in the API request on create (PUT) operations, which is not supportedSteps to Reproduce
terraform init
terraform apply
Important Factoids
No
References
https://learn.microsoft.com/en-us/rest/api/aiservices/accountmanagement/deployments/create-or-update#skutier
The text was updated successfully, but these errors were encountered: