Is there an existing issue for this?
Community Note
- 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.
Description
Today, only format of type "OpenAI" is supported for azurerm_cognitive_deployments (https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cognitive_deployment#format-1). This makes attempting to manage non OpenAI model deployments impossible. My goal is to manage a Azure AI model catalog MaaS deployment for DeepSeek (and other models) via the azurerm_cognitive_deployment. Before anyone already mentions that this can be done via azapi, I do not view azapi as a true TF provider in that true lifecycle support does not exist. We have seen large inconsistencies in formats of API calls, and outputs in azapi. We limit its use in our environment as much as possible.
When attempting to do an import, I get the proper diff, but the limitation in the format input makes it impossible to manage.
Diff and plan:
`-/+ resource "azurerm_cognitive_deployment" "foobar" {
cognitive_account_id = "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxx/providers/Microsoft.CognitiveServices/accounts/xxxxxxxxx"
- dynamic_throttling_enabled = false -> null
~ id = "/subscriptions/xxxxxxxxx/resourceGroups/xxxxxxxxxx/providers/Microsoft.CognitiveServices/accounts/xxxxxxxxxx/deployments/DeepSeek-R1" -> (known after apply)
~ name = "DeepSeek-R1" -> "testing" # forces replacement
version_upgrade_option = "OnceNewDefaultVersionAvailable"
~ model {
~ format = "DeepSeek" -> "OpenAI" # forces replacement
~ name = "DeepSeek-R1" -> "test" # forces replacement
~ version = "1" -> "4"
}
~ sku {
~ capacity = 1 -> 50
name = "GlobalStandard"
}
}
Plan: 1 to import, 2 to add, 0 to change, 1 to destroy.
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you run "terraform apply" now.
------New TF Plan with updated format to DeepSeek)
╷
│ Error: expected model.0.format to be one of ["OpenAI"], got DeepSeek
│
│ with azurerm_cognitive_deployment.foobar,
│ on main.tf line 83, in resource "azurerm_cognitive_deployment" "foobar":
│ 83: format = "DeepSeek"
│
╵`
New or Affected Resource(s)/Data Source(s)
azurerm_cognitive_deployment
Potential Terraform Configuration
resource "azurerm_cognitive_deployment" "foobar" {
name = "DeepSeek-R1"
cognitive_account_id = azurerm_ai_services.account.id
model {
format = "DeepSeek"
name = "DeepSeek-R1"
version = "1"
}
sku {
name = "GlobalStandard"
capacity = "1"
}
}
References
No response
Is there an existing issue for this?
Community Note
Description
Today, only format of type "OpenAI" is supported for azurerm_cognitive_deployments (https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cognitive_deployment#format-1). This makes attempting to manage non OpenAI model deployments impossible. My goal is to manage a Azure AI model catalog MaaS deployment for DeepSeek (and other models) via the azurerm_cognitive_deployment. Before anyone already mentions that this can be done via azapi, I do not view azapi as a true TF provider in that true lifecycle support does not exist. We have seen large inconsistencies in formats of API calls, and outputs in azapi. We limit its use in our environment as much as possible.
When attempting to do an import, I get the proper diff, but the limitation in the format input makes it impossible to manage.
Diff and plan:
`-/+ resource "azurerm_cognitive_deployment" "foobar" {
cognitive_account_id = "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxx/providers/Microsoft.CognitiveServices/accounts/xxxxxxxxx"
- dynamic_throttling_enabled = false -> null
~ id = "/subscriptions/xxxxxxxxx/resourceGroups/xxxxxxxxxx/providers/Microsoft.CognitiveServices/accounts/xxxxxxxxxx/deployments/DeepSeek-R1" -> (known after apply)
~ name = "DeepSeek-R1" -> "testing" # forces replacement
version_upgrade_option = "OnceNewDefaultVersionAvailable"
Plan: 1 to import, 2 to add, 0 to change, 1 to destroy.
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you run "terraform apply" now.
------New TF Plan with updated format to DeepSeek)
╷
│ Error: expected model.0.format to be one of ["OpenAI"], got DeepSeek
│
│ with azurerm_cognitive_deployment.foobar,
│ on main.tf line 83, in resource "azurerm_cognitive_deployment" "foobar":
│ 83: format = "DeepSeek"
│
╵`
New or Affected Resource(s)/Data Source(s)
azurerm_cognitive_deployment
Potential Terraform Configuration
References
No response