I am aware of Azure openai service can be created using azurerm_cognitive_account
.
resource "azurerm_cognitive_account" "openai_services" {
for_each = { for openai in var.openai_services : openai.name => openai }
name = each.value.name
location = each.value.location
resource_group_name = each.value.resource_group_name
kind = "OpenAI"
sku_name = each.value.sku_name
public_network_access_enabled = each.value.public_network_access_enabled
identity {
type = "SystemAssigned"
}
tags = merge(var.default_tags, each.value.tags)
}
However, I am unware if facility exist for multi-service in Azure Terraform provider.
How to create Azure AI services multi-service account using Terraform?
To achieve this configuration make sure you provide with necessary permissions to the
contributor
level.The Only change that needs to take place here is kind = "CognitiveServices" This makes your Cognitive Services account act as multi service account.
The major changes among the two types of kinds are:
My terraform configuration:
main.tf:
variable.tf:
terraform.tfvars:
Output.tf:
Output: