Azure / terraform-azurerm-openai

Terraform module for deploying Azure OpenAI Service.
MIT License
44 stars 33 forks source link

The capacity parameter for deployment does not work #60

Closed MustafinAlex closed 9 months ago

MustafinAlex commented 10 months ago

Is there an existing issue for this?

Greenfield/Brownfield provisioning

greenfield

Terraform Version

1.4.6

Module Version

0.1.1

AzureRM Provider Version

3.86.0

Affected Resource(s)/Data Source(s)

resource "azurerm_cognitive_deployment

Terraform Configuration Files

module "openai" {
  source                        = "Azure/openai/azurerm"
  version                       = "0.1.1"
  resource_group_name           = var.resource_group_name
  location                      = var.localation
  public_network_access_enabled = true
  deployment = {
    "gpt-35" = {
      name                    = "gpt-35"
      model_format            = "OpenAI"
      model_name              = "gpt-35-turbo"
      model_version           = "1106"
      scale_type              = "Standard"
      capacity                = 20
      version_upgrade_option  = "OnceCurrentVersionExpired"
    },
  }
  depends_on = [
    azurerm_resource_group.this
  ]
}

tfvars variables values

localation          = "FranceCentral"
resource_group_name = "openai-public-endpoint"

Debug Output/Panic Output

# module.openai.azurerm_cognitive_deployment.this["gpt-35"] will be created
  + resource "azurerm_cognitive_deployment" "this" {
      + cognitive_account_id   = (known after apply)
      + id                     = (known after apply)
      + name                   = "gpt-35"
      + version_upgrade_option = "OnceNewDefaultVersionAvailable"

      + model {
          + format  = "OpenAI"
          + name    = "gpt-35-turbo"
          + version = "1106"
        }

      + scale {
          + capacity = 1
          + type     = "Standard"
        }
    }

Expected Behaviour

Capacity have to 20

Actual Behaviour

Capacity still is 1

Steps to Reproduce

No response

Important Factoids

No response

References

No response

zioproto commented 10 months ago

It is because version 0.1.1 does not contain PR #45 where capacity was implemented.

Until we release 0.1.2 can you please use the main branch:

module "openai" {
  source  = "github.com/Azure/terraform-azurerm-openai"
soferreira commented 9 months ago

Hi @MustafinAlex, the capacity argument is now available in the 0.1.2 version. Thanks for reporting this issue.