Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make deployment sku values configurable for all the deployments #76

Merged
merged 1 commit into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}))
}
Loading