From 74ab7fc2c2e4f90560ff91369f2b55727ea1981d Mon Sep 17 00:00:00 2001 From: "Menghua Chen (WICRESOFT NORTH AMERICA LTD)" Date: Mon, 14 Oct 2024 14:41:51 +0800 Subject: [PATCH] update hub parameter --- avm/ptn/azd/ml-ai-environment/main.json | 12 ++++-------- avm/ptn/azd/ml-ai-environment/modules/hub.bicep | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/avm/ptn/azd/ml-ai-environment/main.json b/avm/ptn/azd/ml-ai-environment/main.json index 0e604bd827c..cb3b56312e1 100644 --- a/avm/ptn/azd/ml-ai-environment/main.json +++ b/avm/ptn/azd/ml-ai-environment/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.30.23.60470", - "templateHash": "139918832443091761" + "templateHash": "149833058937281725" }, "name": "Azd Azure Machine Learning Environment", "description": "Create Azure Machine Learning workspaces of type 'Hub' and 'Project' and their required dependencies.\n\n**Note:** This module is not intended for broad, generic use, as it was designed to cater for the requirements of the AZD CLI product. Feature requests and bug fix requests are welcome if they support the development of the AZD CLI but may not be incorporated if they aim to make this module more generic than what it needs to be for its primary use case.", @@ -18987,7 +18987,7 @@ "_generator": { "name": "bicep", "version": "0.30.23.60470", - "templateHash": "15986979222145446453" + "templateHash": "7726052800082491375" } }, "parameters": { @@ -19113,18 +19113,14 @@ "kind": { "value": "Hub" }, - "associatedApplicationInsightsResourceId": { - "value": "[parameters('applicationInsightsResourceId')]" - }, "associatedKeyVaultResourceId": { "value": "[parameters('keyVaultResourceId')]" }, "associatedStorageAccountResourceId": { "value": "[parameters('storageAccountResourceId')]" }, - "associatedContainerRegistryResourceId": { - "value": "[parameters('containerRegistryResourceId')]" - }, + "associatedApplicationInsightsResourceId": "[if(not(empty(parameters('applicationInsightsResourceId'))), createObject('value', parameters('applicationInsightsResourceId')), createObject('value', null()))]", + "associatedContainerRegistryResourceId": "[if(not(empty(parameters('containerRegistryResourceId'))), createObject('value', parameters('containerRegistryResourceId')), createObject('value', null()))]", "hbiWorkspace": { "value": false }, diff --git a/avm/ptn/azd/ml-ai-environment/modules/hub.bicep b/avm/ptn/azd/ml-ai-environment/modules/hub.bicep index a5d80eae397..1eeade3a0aa 100644 --- a/avm/ptn/azd/ml-ai-environment/modules/hub.bicep +++ b/avm/ptn/azd/ml-ai-environment/modules/hub.bicep @@ -109,10 +109,10 @@ module hub 'br/public:avm/res/machine-learning-services/workspace:0.8.1' = { location: location tags: tags kind: 'Hub' - associatedApplicationInsightsResourceId: applicationInsightsResourceId associatedKeyVaultResourceId: keyVaultResourceId associatedStorageAccountResourceId: storageAccountResourceId - associatedContainerRegistryResourceId: containerRegistryResourceId + associatedApplicationInsightsResourceId: !empty(applicationInsightsResourceId) ? applicationInsightsResourceId : null + associatedContainerRegistryResourceId: !empty(containerRegistryResourceId) ? containerRegistryResourceId : null hbiWorkspace: false managedNetworkSettings: { isolationMode: 'Disabled'