Skip to content

Think-Cube/terraform-azure-openai

Repository files navigation

Requirements

Name Version
terraform >= 1.6.3
azurerm 4.45.0

Providers

Name Version
azurerm 4.45.0

Modules

No modules.

Resources

Name Type
azurerm_cognitive_account.main resource
azurerm_cognitive_deployment.main resource
azurerm_client_config.current data source
azurerm_resource_group.rg data source

Inputs

Name Description Type Default Required
cognitive_account_custom_subdomain_name Custom subdomain name for the Azure OpenAI Service, if applicable. string n/a yes
cognitive_account_kind The type of Cognitive Service Account to create (e.g., OpenAI, ComputerVision). Changing this triggers resource recreation. string "OpenAI" no
cognitive_account_name The name of the Azure Cognitive Service Account. Changing this triggers resource recreation. string n/a yes
cognitive_account_public_network_access_enabled Controls whether public network access is enabled for the Azure OpenAI Service. bool true no
cognitive_account_sku_name The pricing tier (SKU) for the Azure OpenAI Service (e.g., S0). string "S0" no
default_tags A map of key-value pairs to tag resources for organization and management. map(any) n/a yes
deployment Configures Cognitive Services Account deployments with the following attributes:
- name: The deployment name. Changing this triggers resource recreation.
- model_format: The model format (e.g., OpenAI). Changing this triggers resource recreation.
- model_name: The name of the deployment model. Changing this triggers resource recreation.
- model_version: The version of the deployment model.
- scale_type: The deployment scale type (e.g., Standard). Changing this triggers resource recreation.
- rai_policy_name: Optional Responsible AI policy name. Changing this triggers resource recreation.
- capacity: Optional Tokens-per-Minute (TPM) capacity, defaults to 1 (1000 tokens/min).
- version_upgrade_option: Optional model version upgrade policy (e.g., OnceNewDefaultVersionAvailable, OnceCurrentVersionExpired, NoAutoUpgrade).
map(object({
name = string
model_format = string
model_name = string
model_version = string
scale_type = string
rai_policy_name = optional(string)
capacity = optional(number)
version_upgrade_option = optional(string)
}))
{} no
environment Defines the environment type for the backend container (e.g., dev, prod, staging). string "dev" no
identity_enabled Enables or disables managed identity for the Cognitive Service Account. bool false no
identity_type Specifies the managed identity type (e.g., SystemAssigned, UserAssigned). string "SystemAssigned" no
network_acls_default_action Sets the default action for network ACLs (e.g., Allow or Deny). string "Deny" no
network_acls_enabled Enables or disables network Access Control Lists (ACLs) for the Cognitive Service Account. bool false no
network_acls_ip_rules A list of IP addresses or CIDR blocks allowed in network ACLs. list(string) [] no
network_acls_virtual_network_rules A list of virtual network rules for network ACLs, specifying subnet ID and optional service endpoint settings.
list(object({
subnet_id = string
ignore_missing_vnet_service_endpoint = optional(bool)
}))
[] no
region The Azure region where resources will be deployed (e.g., 'weu' for West Europe). string "weu" no
resource_group_location The Azure region for creating the resource group. Changing this triggers resource recreation. string "West Europe" no
resource_group_name The name of the Azure resource group where resources will be provisioned. string n/a yes

Outputs

Name Description
cognitive_account_endpoint The endpoint URL of the Azure Cognitive Service Account.
cognitive_account_id The resource ID of the Azure Cognitive Service Account.
cognitive_account_location The Azure region where the Cognitive Service Account is deployed.
cognitive_account_name The name of the Azure Cognitive Service Account.
cognitive_account_primary_access_key The primary access key for the Azure Cognitive Service Account.
cognitive_account_resource_group_name The name of the resource group containing the Cognitive Service Account.
cognitive_account_secondary_access_key The secondary access key for the Azure Cognitive Service Account.
cognitive_deployment_ids A map of deployment names to their respective resource IDs for the Cognitive Service Account deployments.

About

Terraform module for provisioning and configuring Azure OpenAI Service

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages