Skip to content

Commit

Permalink
[Modules] Fix Machine Learning Workspaces SKU Type and update API ver…
Browse files Browse the repository at this point in the history
…sion to "2022-10-01" (Azure#2549)
  • Loading branch information
ahmadabdalla authored Jan 10, 2023
1 parent 10ab8a7 commit e9ed281
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ module testDeployment '../../deploy.bicep' = {
associatedApplicationInsightsResourceId: resourceGroupResources.outputs.applicationInsightsResourceId
associatedKeyVaultResourceId: resourceGroupResources.outputs.keyVaultResourceId
associatedStorageAccountResourceId: resourceGroupResources.outputs.storageAccountResourceId
sku: 'Basic'
sku: 'Premium'
computes: [
{
computeLocation: 'westeurope'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ param location string = resourceGroup().location
@sys.description('Optional. Specifies the sku, also referred as "edition". Required for creating a compute resource.')
@allowed([
'Basic'
'Enterprise'
'Free'
'Premium'
'Standard'
''
])
param sku string = ''
Expand Down Expand Up @@ -79,7 +81,7 @@ var identity = identityType != 'None' ? {
// ============================= //
// Existing resources references //
// ============================= //
resource machineLearningWorkspace 'Microsoft.MachineLearningServices/workspaces@2022-05-01' existing = {
resource machineLearningWorkspace 'Microsoft.MachineLearningServices/workspaces@2022-10-01' existing = {
name: machineLearningWorkspaceName
}

Expand All @@ -98,7 +100,7 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena
}
}

resource machineLearningWorkspaceCompute 'Microsoft.MachineLearningServices/workspaces/computes@2022-05-01' = if (deployCompute == true) {
resource machineLearningWorkspaceCompute 'Microsoft.MachineLearningServices/workspaces/computes@2022-10-01' = if (deployCompute == true) {
name: name
location: location
tags: empty(resourceId) ? tags : any(null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Attaching a compute is not idempotent and will fail in case you try to redeploy

| Resource Type | API Version |
| :-- | :-- |
| `Microsoft.MachineLearningServices/workspaces/computes` | [2022-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.MachineLearningServices/2022-05-01/workspaces/computes) |
| `Microsoft.MachineLearningServices/workspaces/computes` | [2022-10-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.MachineLearningServices/2022-10-01/workspaces/computes) |

## Parameters

Expand Down Expand Up @@ -43,7 +43,7 @@ Attaching a compute is not idempotent and will fail in case you try to redeploy
| `location` | string | `[resourceGroup().location]` | | Specifies the location of the resource. |
| `properties` | object | `{object}` | | The properties of the compute. Will be ignored in case "resourceId" is set. |
| `resourceId` | string | `''` | | ARM resource ID of the underlying compute. |
| `sku` | string | `''` | `['', Basic, Enterprise]` | Specifies the sku, also referred as "edition". Required for creating a compute resource. |
| `sku` | string | `''` | `['', Basic, Free, Premium, Standard]` | Specifies the sku, also referred as "edition". Required for creating a compute resource. |
| `systemAssignedIdentity` | bool | `False` | | Enables system assigned managed identity on the resource. Ignored when attaching a compute resource, i.e. when you provide a resource ID. |
| `tags` | object | `{object}` | | Contains resource tags defined as key-value pairs. Ignored when attaching a compute resource, i.e. when you provide a resource ID. |
| `userAssignedIdentities` | object | `{object}` | | The ID(s) to assign to the resource. Ignored when attaching a compute resource, i.e. when you provide a resource ID. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ param location string = resourceGroup().location
'Free'
'Basic'
'Standard'
'Enterprise'
'Premium'
])
param sku string

Expand Down Expand Up @@ -206,7 +206,7 @@ resource cMKKeyVaultKey 'Microsoft.KeyVault/vaults/keys@2021-10-01' existing = i
scope: resourceGroup(split(cMKKeyVaultResourceId, '/')[2], split(cMKKeyVaultResourceId, '/')[4])
}

resource workspace 'Microsoft.MachineLearningServices/workspaces@2022-05-01' = {
resource workspace 'Microsoft.MachineLearningServices/workspaces@2022-10-01' = {
name: name
location: location
tags: tags
Expand Down
10 changes: 5 additions & 5 deletions modules/Microsoft.MachineLearningServices/workspaces/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ This module deploys a Machine Learning Services Workspace.
| `Microsoft.Authorization/locks` | [2020-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
| `Microsoft.MachineLearningServices/workspaces` | [2022-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.MachineLearningServices/2022-05-01/workspaces) |
| `Microsoft.MachineLearningServices/workspaces/computes` | [2022-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.MachineLearningServices/2022-05-01/workspaces/computes) |
| `Microsoft.MachineLearningServices/workspaces` | [2022-10-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.MachineLearningServices/2022-10-01/workspaces) |
| `Microsoft.MachineLearningServices/workspaces/computes` | [2022-10-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.MachineLearningServices/2022-10-01/workspaces/computes) |
| `Microsoft.Network/privateEndpoints` | [2022-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-05-01/privateEndpoints) |
| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2022-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-05-01/privateEndpoints/privateDnsZoneGroups) |

Expand All @@ -32,7 +32,7 @@ This module deploys a Machine Learning Services Workspace.
| `associatedKeyVaultResourceId` | string | | The resource ID of the associated Key Vault. |
| `associatedStorageAccountResourceId` | string | | The resource ID of the associated Storage Account. |
| `name` | string | | The name of the machine learning workspace. |
| `sku` | string | `[Basic, Enterprise, Free, Standard]` | Specifies the SKU, also referred as 'edition' of the Azure Machine Learning workspace. |
| `sku` | string | `[Basic, Free, Premium, Standard]` | Specifies the SKU, also referred as 'edition' of the Azure Machine Learning workspace. |

**Conditional parameters**

Expand Down Expand Up @@ -455,7 +455,7 @@ module workspaces './Microsoft.MachineLearningServices/workspaces/deploy.bicep'
associatedKeyVaultResourceId: '<associatedKeyVaultResourceId>'
associatedStorageAccountResourceId: '<associatedStorageAccountResourceId>'
name: '<<namePrefix>>mlswcom001'
sku: 'Basic'
sku: 'Premium'
// Non-required parameters
computes: [
{
Expand Down Expand Up @@ -550,7 +550,7 @@ module workspaces './Microsoft.MachineLearningServices/workspaces/deploy.bicep'
"value": "<<namePrefix>>mlswcom001"
},
"sku": {
"value": "Basic"
"value": "Premium"
},
// Non-required parameters
"computes": {
Expand Down

0 comments on commit e9ed281

Please sign in to comment.