Skip to content

Commit

Permalink
Make deployment sku values configurable for all the deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeshajay committed May 17, 2024
1 parent f016885 commit 134f890
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
4 changes: 2 additions & 2 deletions modules/azurerm/Azure-OpenAI-Service/azure_openai_service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
20 changes: 6 additions & 14 deletions modules/azurerm/Azure-OpenAI-Service/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}))
}

0 comments on commit 134f890

Please sign in to comment.