Skip to content
Open
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
12 changes: 12 additions & 0 deletions avm/res/cognitive-services/account/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

The latest version of the changelog can be found [here](https://github.com/Azure/bicep-registry-modules/blob/main/avm/res/cognitive-services/account/CHANGELOG.md).

## 0.16.0

### Changes

- Added optional `modelProviderData` (`organizationName`, `countryCode`, `industry`) to `deploymentType`, and project it onto `Microsoft.CognitiveServices/accounts/deployments`. This carries the model-provider attestation that the Cognitive Services RP requires for GA partner models such as Anthropic Claude (`model.format == 'Anthropic'`), which it uses to auto-accept the partner's Azure Marketplace offer (fixes [#7197](https://github.com/Azure/bicep-registry-modules/issues/7197))
- Bumped the `Microsoft.CognitiveServices/accounts/deployments` API version from `@2025-06-01` to `@2026-05-01`, the minimum GA version that accepts `properties.modelProviderData`
- Refactored `Microsoft.CognitiveServices/accounts/deployments` from an inline resource loop into a dedicated `deployment` child module while preserving the parent module's existing `deployments` parameter contract.

### Breaking Changes

- None.

## 0.15.0

### Changes
Expand Down
279 changes: 181 additions & 98 deletions avm/res/cognitive-services/account/README.md

Large diffs are not rendered by default.

141 changes: 141 additions & 0 deletions avm/res/cognitive-services/account/deployment/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Cognitive Services Account Deployment `[Microsoft.CognitiveServices/accounts/deployments]`

This module deploys a Cognitive Services account model deployment.

## Navigation

- [Resource Types](#Resource-Types)
- [Parameters](#Parameters)
- [Outputs](#Outputs)
- [Data Collection](#Data-Collection)

## Resource Types

| Resource Type | API Version | References |
| :-- | :-- | :-- |
| `Microsoft.CognitiveServices/accounts/deployments` | 2026-05-01 | <ul style="padding-left: 0px;"><li>[AzAdvertizer](https://www.azadvertizer.net/azresourcetypes/microsoft.cognitiveservices_accounts_deployments.html)</li><li>[Template reference](https://learn.microsoft.com/en-us/azure/templates/Microsoft.CognitiveServices/2026-05-01/accounts/deployments)</li></ul> |

## Parameters

**Required parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`accountName`](#parameter-accountname) | string | The name of the parent Cognitive Services account. |
| [`model`](#parameter-model) | object | Properties of the Cognitive Services account deployment model. |
| [`name`](#parameter-name) | string | The name of the Cognitive Services account deployment. |

**Optional parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable or disable usage telemetry for the module. |
| [`modelProviderData`](#parameter-modelproviderdata) | object | Model-provider attestation required for GA partner models such as Anthropic Claude. |
| [`raiPolicyName`](#parameter-raipolicyname) | string | The name of the RAI policy. |
| [`sku`](#parameter-sku) | object | The resource model definition representing the SKU. |
| [`versionUpgradeOption`](#parameter-versionupgradeoption) | string | The version upgrade option. |

### Parameter: `accountName`

The name of the parent Cognitive Services account.

- Required: Yes
- Type: string

### Parameter: `model`

Properties of the Cognitive Services account deployment model.

- Required: Yes
- Type: object

### Parameter: `name`

The name of the Cognitive Services account deployment.

- Required: Yes
- Type: string

### Parameter: `enableTelemetry`

Enable or disable usage telemetry for the module.

- Required: No
- Type: bool
- Default: `True`

### Parameter: `modelProviderData`

Model-provider attestation required for GA partner models such as Anthropic Claude.

- Required: No
- Type: object

**Required parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`countryCode`](#parameter-modelproviderdatacountrycode) | string | Two-letter ISO 3166-1 alpha-2 country or region code. |
| [`industry`](#parameter-modelproviderdataindustry) | string | The organization industry accepted by the resource provider. |
| [`organizationName`](#parameter-modelproviderdataorganizationname) | string | Legal entity name of the organization deploying the model. |

### Parameter: `modelProviderData.countryCode`

Two-letter ISO 3166-1 alpha-2 country or region code.

- Required: Yes
- Type: string

### Parameter: `modelProviderData.industry`

The organization industry accepted by the resource provider.

- Required: Yes
- Type: string

### Parameter: `modelProviderData.organizationName`

Legal entity name of the organization deploying the model.

- Required: Yes
- Type: string

### Parameter: `raiPolicyName`

The name of the RAI policy.

- Required: No
- Type: string

### Parameter: `sku`

The resource model definition representing the SKU.

- Required: No
- Type: object
- Default:
```Bicep
{
capacity: 1
name: 'Standard'
}
```

### Parameter: `versionUpgradeOption`

The version upgrade option.

- Required: No
- Type: string

## Outputs

| Output | Type | Description |
| :-- | :-- | :-- |
| `name` | string | The name of the Cognitive Services account deployment. |
| `resourceGroupName` | string | The name of the resource group in which the deployment was created. |
| `resourceId` | string | The resource ID of the Cognitive Services account deployment. |

## Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the [repository](https://aka.ms/avm/telemetry). There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. Our privacy statement is located at <https://go.microsoft.com/fwlink/?LinkID=824704>. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
114 changes: 114 additions & 0 deletions avm/res/cognitive-services/account/deployment/main.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
metadata name = 'Cognitive Services Account Deployment'
metadata description = 'This module deploys a Cognitive Services account model deployment.'

@description('Required. The name of the Cognitive Services account deployment.')
param name string

@description('Required. The name of the parent Cognitive Services account.')
param accountName string

@description('Required. Properties of the Cognitive Services account deployment model.')
param model resourceInput<'Microsoft.CognitiveServices/accounts/deployments@2025-06-01'>.properties.model

@description('Optional. The resource model definition representing the SKU.')
param sku resourceInput<'Microsoft.CognitiveServices/accounts/deployments@2025-06-01'>.sku = {
name: 'Standard'
capacity: 1
}

@description('Optional. The name of the RAI policy.')
param raiPolicyName string?

@description('Optional. The version upgrade option.')
param versionUpgradeOption string?

@description('Optional. Model-provider attestation required for GA partner models such as Anthropic Claude.')
param modelProviderData modelProviderDataType?

@description('Optional. Enable or disable usage telemetry for the module.')
param enableTelemetry bool = true

#disable-next-line no-deployments-resources
resource avmTelemetry 'Microsoft.Resources/deployments@2025-04-01' = if (enableTelemetry) {
name: '46d3xbcp.res.cognitiveservices-account-deployment.${replace('-..--..-', '.', '-')}.${substring(uniqueString(deployment().name), 0, 4)}'
properties: {
mode: 'Incremental'
template: {
'$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
contentVersion: '1.0.0.0'
resources: []
outputs: {
telemetry: {
type: 'String'
value: 'For more information, see https://aka.ms/avm/TelemetryInfo'
}
}
}
}
}

resource cognitiveServiceAccount 'Microsoft.CognitiveServices/accounts@2025-06-01' existing = {
name: accountName
}

// 2026-05-01 is the minimum GA API version that supports modelProviderData.
#disable-next-line BCP081
resource cognitiveServiceDeployment 'Microsoft.CognitiveServices/accounts/deployments@2026-05-01' = {
parent: cognitiveServiceAccount
name: name
properties: {
model: model
raiPolicyName: raiPolicyName
versionUpgradeOption: versionUpgradeOption
modelProviderData: modelProviderData
}
sku: sku
}

@description('The name of the Cognitive Services account deployment.')
output name string = cognitiveServiceDeployment.name

@description('The resource ID of the Cognitive Services account deployment.')
output resourceId string = cognitiveServiceDeployment.id

@description('The name of the resource group in which the deployment was created.')
output resourceGroupName string = resourceGroup().name

// =============== //
// Definitions //
// =============== //

@export()
@description('Model-provider attestation information.')
type modelProviderDataType = {
@description('Required. Legal entity name of the organization deploying the model.')
organizationName: string

@description('Required. Two-letter ISO 3166-1 alpha-2 country or region code.')
countryCode: string

@description('Required. The organization industry accepted by the resource provider.')
industry: string
}

@export()
@description('The type for a Cognitive Services account deployment.')
type deploymentType = {
@description('Optional. The name of the Cognitive Services account deployment.')
name: string?

@description('Required. Properties of the deployment model.')
model: resourceInput<'Microsoft.CognitiveServices/accounts/deployments@2025-06-01'>.properties.model

@description('Optional. The resource model definition representing the SKU.')
sku: resourceInput<'Microsoft.CognitiveServices/accounts/deployments@2025-06-01'>.sku?

@description('Optional. The name of the RAI policy.')
raiPolicyName: string?

@description('Optional. The version upgrade option.')
versionUpgradeOption: string?

@description('Optional. Model-provider attestation required for GA partner models.')
modelProviderData: modelProviderDataType?
}
Loading