diff --git a/modules/azurerm/Azure-OpenAI-Service/azure_openai_service.tf b/modules/azurerm/Azure-OpenAI-Service/azure_openai_service.tf index b1e289b2..e56e2774 100644 --- a/modules/azurerm/Azure-OpenAI-Service/azure_openai_service.tf +++ b/modules/azurerm/Azure-OpenAI-Service/azure_openai_service.tf @@ -35,7 +35,7 @@ resource "azurerm_cognitive_deployment" "azure_openai_deployment" { version = each.value.cognitive_model_version } scale { - type = var.deployment_sku_scale_type - capacity = var.deployment_sku_scale_capacity + type = each.value.deployment_sku_scale_type + capacity = each.value.deployment_sku_scale_capacity } } diff --git a/modules/azurerm/Azure-OpenAI-Service/variables.tf b/modules/azurerm/Azure-OpenAI-Service/variables.tf index e8229cc8..8dc849ac 100644 --- a/modules/azurerm/Azure-OpenAI-Service/variables.tf +++ b/modules/azurerm/Azure-OpenAI-Service/variables.tf @@ -82,16 +82,6 @@ variable "version_upgrade_option" { default = "NoAutoUpgrade" } -variable "deployment_sku_scale_type" { - description = "The name of the SKU. Ex - Standard or P3." - type = string -} - -variable "deployment_sku_scale_capacity" { - description = " Tokens-per-Minute (TPM). The unit of measure for this field is in the thousands of Tokens-per-Minute." - type = string -} - variable "tags" { description = "Default tag list" type = map(string) @@ -100,9 +90,11 @@ variable "tags" { variable "azure_openai_deployments" { description = "Map of OpenAI deployments in the Azure Cognitive Account" type = map(object({ - cognitive_deployment_name = string - cognitive_model_format = string - cognitive_model_name = string - cognitive_model_version = string + cognitive_deployment_name = string + cognitive_model_format = string + cognitive_model_name = string + cognitive_model_version = string + deployment_sku_scale_type = string + deployment_sku_scale_capacity = string })) }