Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
cecheta committed Jul 11, 2024
1 parent 535e01b commit f3cff46
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 31 deletions.
26 changes: 13 additions & 13 deletions avm/ptn/ai-platform/baseline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,25 +118,25 @@ module baseline 'br/public:avm/ptn/ai-platform/baseline:<version>' = {
name: 'aipbmax'
// Non-required parameters
applicationInsightsSettings: {
name: 'dep-appi-aipbmax'
name: 'appi-aipbmax'
}
containerRegistrySettings: {
name: 'depcraipbmax'
name: 'craipbmax'
trustPolicyStatus: 'disabled'
}
keyVaultSettings: {
enablePurgeProtection: false
name: '<name>'
}
logAnalyticsSettings: {
name: 'dep-log-aipbmax'
name: 'log-aipbmax'
}
managedIdentitySettings: {
name: 'dep-id-aipbmax'
name: 'id-aipbmax'
}
storageAccountSettings: {
allowSharedKeyAccess: true
name: 'depstaipbmax'
name: 'staipbmax'
}
workspaceHubSettings: {
computes: [
Expand All @@ -151,7 +151,7 @@ module baseline 'br/public:avm/ptn/ai-platform/baseline:<version>' = {
sku: 'Standard'
}
]
name: 'dep-hub-aipbmax'
name: 'hub-aipbmax'
networkIsolationMode: 'AllowOnlyApprovedOutbound'
networkOutboundRules: {
rule1: {
Expand Down Expand Up @@ -188,12 +188,12 @@ module baseline 'br/public:avm/ptn/ai-platform/baseline:<version>' = {
// Non-required parameters
"applicationInsightsSettings": {
"value": {
"name": "dep-appi-aipbmax"
"name": "appi-aipbmax"
}
},
"containerRegistrySettings": {
"value": {
"name": "depcraipbmax",
"name": "craipbmax",
"trustPolicyStatus": "disabled"
}
},
Expand All @@ -205,18 +205,18 @@ module baseline 'br/public:avm/ptn/ai-platform/baseline:<version>' = {
},
"logAnalyticsSettings": {
"value": {
"name": "dep-log-aipbmax"
"name": "log-aipbmax"
}
},
"managedIdentitySettings": {
"value": {
"name": "dep-id-aipbmax"
"name": "id-aipbmax"
}
},
"storageAccountSettings": {
"value": {
"allowSharedKeyAccess": true,
"name": "depstaipbmax"
"name": "staipbmax"
}
},
"workspaceHubSettings": {
Expand All @@ -233,7 +233,7 @@ module baseline 'br/public:avm/ptn/ai-platform/baseline:<version>' = {
"sku": "Standard"
}
],
"name": "dep-hub-aipbmax",
"name": "hub-aipbmax",
"networkIsolationMode": "AllowOnlyApprovedOutbound",
"networkOutboundRules": {
"rule1": {
Expand Down Expand Up @@ -644,7 +644,7 @@ This section gives you an overview of all local-referenced module files (i.e., o
| `br/public:avm/res/insights/component:0.3.1` | Remote reference |
| `br/public:avm/res/key-vault/vault:0.6.2` | Remote reference |
| `br/public:avm/res/machine-learning-services/workspace:0.4.0` | Remote reference |
| `br/public:avm/res/storage/storage-account:0.9.1` | Remote reference |
| `br/public:avm/res/storage/storage-account:0.11.0` | Remote reference |

## Data Collection

Expand Down
2 changes: 1 addition & 1 deletion avm/ptn/ai-platform/baseline/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ module keyVault 'br/public:avm/res/key-vault/vault:0.6.2' = {
}
}

module storageAccount 'br/public:avm/res/storage/storage-account:0.9.1' = {
module storageAccount 'br/public:avm/res/storage/storage-account:0.11.0' = {
name: '${uniqueString(deployment().name, location)}-storage'
params: {
name: storageAccountSettings.?name ?? 'st${name}'
Expand Down
42 changes: 32 additions & 10 deletions avm/ptn/ai-platform/baseline/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.28.1.47646",
"templateHash": "10362412508456263694"
"templateHash": "10479830668992055965"
},
"name": "AI Platform Baseline",
"description": "This module provides a secure and scalable environment for deploying AI applications on Azure.\nThe module encompasses all essential components required for building, managing, and observing AI solutions, including a machine learning workspace, observability tools, and necessary data management services.\nBy integrating with Microsoft Entra ID for secure identity management and utilizing private endpoints for services like Key Vault and Blob Storage, the module ensures secure communication and data access.",
Expand Down Expand Up @@ -3308,7 +3308,7 @@
"_generator": {
"name": "bicep",
"version": "0.28.1.47646",
"templateHash": "3958760216991467865"
"templateHash": "7296091181254270609"
},
"name": "Storage Accounts",
"description": "This module deploys a Storage Account.",
Expand Down Expand Up @@ -3519,10 +3519,17 @@
"description": "Optional. The location to deploy the private endpoint to."
}
},
"privateLinkServiceConnectionName": {
"type": "string",
"nullable": true,
"metadata": {
"description": "Optional. The name of the private link connection to create."
}
},
"service": {
"type": "string",
"metadata": {
"description": "Required. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
"description": "Required. The subresource to deploy the private endpoint for. For example \"blob\", \"table\", \"queue\" or \"file\"."
}
},
"subnetResourceId": {
Expand Down Expand Up @@ -3552,7 +3559,7 @@
"type": "bool",
"nullable": true,
"metadata": {
"description": "Optional. Manual PrivateLink Service Connections."
"description": "Optional. If Manual Private Link Connection is required."
}
},
"manualConnectionRequestMessage": {
Expand Down Expand Up @@ -3677,6 +3684,13 @@
"metadata": {
"description": "Optional. Enable/Disable usage telemetry for module."
}
},
"resourceGroupName": {
"type": "string",
"nullable": true,
"metadata": {
"description": "Optional. Specify if you want to deploy the Private Endpoint into a different resource group than the main resource."
}
}
}
},
Expand Down Expand Up @@ -3933,7 +3947,7 @@
},
"allowCrossTenantReplication": {
"type": "bool",
"defaultValue": true,
"defaultValue": false,
"metadata": {
"description": "Optional. Allow or disallow cross AAD tenant object replication."
}
Expand Down Expand Up @@ -4174,8 +4188,8 @@
"avmTelemetry": {
"condition": "[parameters('enableTelemetry')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2023-07-01",
"name": "[format('46d3xbcp.res.storage-storageaccount.{0}.{1}', replace('0.9.1', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]",
"apiVersion": "2024-03-01",
"name": "[format('46d3xbcp.res.storage-storageaccount.{0}.{1}', replace('0.11.0', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]",
"properties": {
"mode": "Incremental",
"template": {
Expand Down Expand Up @@ -4325,7 +4339,8 @@
},
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"name": "[format('{0}-StorageAccount-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
"name": "[format('{0}-storageAccount-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
"resourceGroup": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'resourceGroupName'), '')]",
"properties": {
"expressionEvaluationOptions": {
"scope": "inner"
Expand All @@ -4335,8 +4350,8 @@
"name": {
"value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.Storage/storageAccounts', parameters('name')), '/')), coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].service, copyIndex()))]"
},
"privateLinkServiceConnections": "[if(not(equals(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections'), true())), createObject('value', createArray(createObject('name', coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateLinkServiceConnectionName'), format('{0}-{1}-{2}', last(split(resourceId('Microsoft.Storage/storageAccounts', parameters('name')), '/')), coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].service, copyIndex())), 'properties', createObject('privateLinkServiceId', resourceId('Microsoft.Storage/storageAccounts', parameters('name')), 'groupIds', createArray(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].service))))), createObject('value', null()))]",
"manualPrivateLinkServiceConnections": "[if(equals(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections'), true()), createObject('value', createArray(createObject('name', coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateLinkServiceConnectionName'), format('{0}-{1}-{2}', last(split(resourceId('Microsoft.Storage/storageAccounts', parameters('name')), '/')), coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].service, copyIndex())), 'properties', createObject('privateLinkServiceId', resourceId('Microsoft.Storage/storageAccounts', parameters('name')), 'groupIds', createArray(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].service), 'requestMessage', coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualConnectionRequestMessage'), 'Manual approval required.'))))), createObject('value', null()))]",
"privateLinkServiceConnections": "[if(not(equals(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'isManualConnection'), true())), createObject('value', createArray(createObject('name', coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateLinkServiceConnectionName'), format('{0}-{1}-{2}', last(split(resourceId('Microsoft.Storage/storageAccounts', parameters('name')), '/')), coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].service, copyIndex())), 'properties', createObject('privateLinkServiceId', resourceId('Microsoft.Storage/storageAccounts', parameters('name')), 'groupIds', createArray(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].service))))), createObject('value', null()))]",
"manualPrivateLinkServiceConnections": "[if(equals(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'isManualConnection'), true()), createObject('value', createArray(createObject('name', coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateLinkServiceConnectionName'), format('{0}-{1}-{2}', last(split(resourceId('Microsoft.Storage/storageAccounts', parameters('name')), '/')), coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].service, copyIndex())), 'properties', createObject('privateLinkServiceId', resourceId('Microsoft.Storage/storageAccounts', parameters('name')), 'groupIds', createArray(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].service), 'requestMessage', coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualConnectionRequestMessage'), 'Manual approval required.'))))), createObject('value', null()))]",
"subnetResourceId": {
"value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
},
Expand Down Expand Up @@ -7931,6 +7946,13 @@
"description": "The location the resource was deployed into."
},
"value": "[reference('storageAccount', '2022-09-01', 'full').location]"
},
"serviceEndpoints": {
"type": "object",
"metadata": {
"description": "All service endpoints of the deployed storage account, Note Standard_LRS and Standard_ZRS accounts only have a blob service endpoint."
},
"value": "[reference('storageAccount').primaryEndpoints]"
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions avm/ptn/ai-platform/baseline/tests/e2e/max/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -55,28 +55,28 @@ module testDeployment '../../../main.bicep' = [
params: {
name: '${namePrefix}${serviceShort}'
managedIdentitySettings: {
name: 'dep-${namePrefix}-id-${serviceShort}'
name: '${namePrefix}-id-${serviceShort}'
}
logAnalyticsSettings: {
name: 'dep-${namePrefix}-log-${serviceShort}'
name: '${namePrefix}-log-${serviceShort}'
}
keyVaultSettings: {
name: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
name: '${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
enablePurgeProtection: false
}
storageAccountSettings: {
name: 'dep${namePrefix}st${serviceShort}'
name: '${namePrefix}st${serviceShort}'
allowSharedKeyAccess: true
}
containerRegistrySettings: {
name: 'dep${namePrefix}cr${serviceShort}'
name: '${namePrefix}cr${serviceShort}'
trustPolicyStatus: 'disabled'
}
applicationInsightsSettings: {
name: 'dep-${namePrefix}-appi-${serviceShort}'
name: '${namePrefix}-appi-${serviceShort}'
}
workspaceHubSettings: {
name: 'dep-${namePrefix}-hub-${serviceShort}'
name: '${namePrefix}-hub-${serviceShort}'
computes: [
{
computeType: 'ComputeInstance'
Expand Down

0 comments on commit f3cff46

Please sign in to comment.