|
5 | 5 | "_generator": { |
6 | 6 | "name": "bicep", |
7 | 7 | "version": "0.33.93.31351", |
8 | | - "templateHash": "11033492472783042104" |
| 8 | + "templateHash": "6189989562818270199" |
9 | 9 | } |
10 | 10 | }, |
11 | 11 | "parameters": { |
|
227 | 227 | "description": "The Cosmos DB Account full ARM Resource ID. This is an optional field, and if not provided, the resource will be created." |
228 | 228 | } |
229 | 229 | }, |
| 230 | + "azureFunctionToolSupport": { |
| 231 | + "type": "string", |
| 232 | + "defaultValue": "Disabled", |
| 233 | + "allowedValues": [ |
| 234 | + "Enabled", |
| 235 | + "Disabled" |
| 236 | + ], |
| 237 | + "metadata": { |
| 238 | + "description": "Specifies if supporting resources for the Azure Function Tools should be created. This is only required if you are using the Azure Function Tools." |
| 239 | + } |
| 240 | + }, |
230 | 241 | "userAssignedIdentityDefaultName": { |
231 | 242 | "type": "string", |
232 | 243 | "defaultValue": "[format('secured-agents-identity-{0}', parameters('uniqueSuffix'))]", |
|
248 | 259 | "cosmosParts": "[split(parameters('cosmosDBResourceId'), '/')]", |
249 | 260 | "cosmosDBSubscriptionId": "[if(variables('cosmosExists'), variables('cosmosParts')[2], subscription().subscriptionId)]", |
250 | 261 | "cosmosDBResourceGroupName": "[if(variables('cosmosExists'), variables('cosmosParts')[4], resourceGroup().name)]", |
251 | | - "cosmosDBAccountName": "[if(variables('cosmosExists'), variables('cosmosParts')[8], variables('cosmosDBName'))]" |
| 262 | + "cosmosDBAccountName": "[if(variables('cosmosExists'), variables('cosmosParts')[8], variables('cosmosDBName'))]", |
| 263 | + "azureFunctionToolSupported": "[equals(parameters('azureFunctionToolSupport'), 'Enabled')]" |
252 | 264 | }, |
253 | 265 | "resources": [ |
254 | 266 | { |
|
525 | 537 | "cosmosDBExists": { |
526 | 538 | "value": "[not(empty(parameters('cosmosDBResourceId')))]" |
527 | 539 | }, |
| 540 | + "azureFunctionToolSupported": { |
| 541 | + "value": "[variables('azureFunctionToolSupported')]" |
| 542 | + }, |
528 | 543 | "cosmosDBName": { |
529 | 544 | "value": "[variables('cosmosDBAccountName')]" |
530 | 545 | }, |
|
563 | 578 | "_generator": { |
564 | 579 | "name": "bicep", |
565 | 580 | "version": "0.33.93.31351", |
566 | | - "templateHash": "13503356786023840518" |
| 581 | + "templateHash": "12245658005145867857" |
567 | 582 | } |
568 | 583 | }, |
569 | 584 | "parameters": { |
|
587 | 602 | "type": "bool", |
588 | 603 | "defaultValue": false |
589 | 604 | }, |
| 605 | + "azureFunctionToolSupported": { |
| 606 | + "type": "bool", |
| 607 | + "defaultValue": false |
| 608 | + }, |
590 | 609 | "location": { |
591 | 610 | "type": "string", |
592 | 611 | "defaultValue": "[resourceGroup().location]", |
|
716 | 735 | "storageParts": "[if(parameters('storageExists'), split(resourceId('Microsoft.Storage/storageAccounts', parameters('storageName')), '/'), split(resourceId('Microsoft.Storage/storageAccounts', variables('storageNameCleaned')), '/'))]" |
717 | 736 | }, |
718 | 737 | "resources": [ |
| 738 | + { |
| 739 | + "condition": "[and(not(parameters('storageExists')), parameters('azureFunctionToolSupported'))]", |
| 740 | + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", |
| 741 | + "apiVersion": "2022-05-01", |
| 742 | + "name": "[format('{0}/{1}/{2}', variables('storageNameCleaned'), 'default', 'input-queue')]", |
| 743 | + "dependsOn": [ |
| 744 | + "[resourceId('Microsoft.Storage/storageAccounts/queueServices', variables('storageNameCleaned'), 'default')]" |
| 745 | + ] |
| 746 | + }, |
| 747 | + { |
| 748 | + "condition": "[and(not(parameters('storageExists')), parameters('azureFunctionToolSupported'))]", |
| 749 | + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", |
| 750 | + "apiVersion": "2022-05-01", |
| 751 | + "name": "[format('{0}/{1}/{2}', variables('storageNameCleaned'), 'default', 'output-queue')]", |
| 752 | + "dependsOn": [ |
| 753 | + "[resourceId('Microsoft.Storage/storageAccounts/queueServices', variables('storageNameCleaned'), 'default')]" |
| 754 | + ] |
| 755 | + }, |
| 756 | + { |
| 757 | + "condition": "[and(not(parameters('storageExists')), parameters('azureFunctionToolSupported'))]", |
| 758 | + "type": "Microsoft.Storage/storageAccounts/queueServices", |
| 759 | + "apiVersion": "2022-05-01", |
| 760 | + "name": "[format('{0}/{1}', variables('storageNameCleaned'), 'default')]", |
| 761 | + "dependsOn": [ |
| 762 | + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageNameCleaned'))]" |
| 763 | + ] |
| 764 | + }, |
719 | 765 | { |
720 | 766 | "type": "Microsoft.ManagedIdentity/userAssignedIdentities", |
721 | 767 | "apiVersion": "2023-07-31-preview", |
|
1480 | 1526 | }, |
1481 | 1527 | "cosmosDBResourceGroup": { |
1482 | 1528 | "value": "[variables('cosmosDBResourceGroupName')]" |
| 1529 | + }, |
| 1530 | + "azureFunctionToolSupported": { |
| 1531 | + "value": "[variables('azureFunctionToolSupported')]" |
1483 | 1532 | } |
1484 | 1533 | }, |
1485 | 1534 | "template": { |
|
1489 | 1538 | "_generator": { |
1490 | 1539 | "name": "bicep", |
1491 | 1540 | "version": "0.33.93.31351", |
1492 | | - "templateHash": "2815470915491127245" |
| 1541 | + "templateHash": "1489959358682641210" |
1493 | 1542 | } |
1494 | 1543 | }, |
1495 | 1544 | "parameters": { |
|
1561 | 1610 | "metadata": { |
1562 | 1611 | "description": "Name of the Customer Hub Workspace" |
1563 | 1612 | } |
| 1613 | + }, |
| 1614 | + "azureFunctionToolSupported": { |
| 1615 | + "type": "bool", |
| 1616 | + "defaultValue": false, |
| 1617 | + "metadata": { |
| 1618 | + "description": "Flag indicating whether azure function tools are supported and backing resources need to be created." |
| 1619 | + } |
1564 | 1620 | } |
1565 | 1621 | }, |
1566 | 1622 | "resources": [ |
|
1633 | 1689 | { |
1634 | 1690 | "type": "Microsoft.Network/privateEndpoints", |
1635 | 1691 | "apiVersion": "2024-05-01", |
1636 | | - "name": "[format('{0}-private-endpoint', parameters('storageName'))]", |
| 1692 | + "name": "[format('{0}-blob-private-endpoint', parameters('storageName'))]", |
1637 | 1693 | "location": "[resourceGroup().location]", |
1638 | 1694 | "properties": { |
1639 | 1695 | "subnet": { |
1640 | 1696 | "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('cxSubnetName'))]" |
1641 | 1697 | }, |
1642 | 1698 | "privateLinkServiceConnections": [ |
1643 | 1699 | { |
1644 | | - "name": "[format('{0}-private-link-service-connection', parameters('storageName'))]", |
| 1700 | + "name": "[format('{0}-blob-private-link-service-connection', parameters('storageName'))]", |
1645 | 1701 | "properties": { |
1646 | 1702 | "privateLinkServiceId": "[parameters('aiStorageId')]", |
1647 | 1703 | "groupIds": [ |
|
1652 | 1708 | ] |
1653 | 1709 | } |
1654 | 1710 | }, |
| 1711 | + { |
| 1712 | + "condition": "[parameters('azureFunctionToolSupported')]", |
| 1713 | + "type": "Microsoft.Network/privateEndpoints", |
| 1714 | + "apiVersion": "2024-05-01", |
| 1715 | + "name": "[format('{0}-queue-private-endpoint', parameters('storageName'))]", |
| 1716 | + "location": "[resourceGroup().location]", |
| 1717 | + "properties": { |
| 1718 | + "subnet": { |
| 1719 | + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('cxSubnetName'))]" |
| 1720 | + }, |
| 1721 | + "privateLinkServiceConnections": [ |
| 1722 | + { |
| 1723 | + "name": "[format('{0}-queue-private-link-service-connection', parameters('storageName'))]", |
| 1724 | + "properties": { |
| 1725 | + "privateLinkServiceId": "[parameters('aiStorageId')]", |
| 1726 | + "groupIds": [ |
| 1727 | + "queue" |
| 1728 | + ] |
| 1729 | + } |
| 1730 | + } |
| 1731 | + ] |
| 1732 | + } |
| 1733 | + }, |
1655 | 1734 | { |
1656 | 1735 | "type": "Microsoft.Network/privateEndpoints", |
1657 | 1736 | "apiVersion": "2024-05-01", |
|
1894 | 1973 | "name": "[format('privatelink.blob.{0}', environment().suffixes.storage)]", |
1895 | 1974 | "location": "global" |
1896 | 1975 | }, |
| 1976 | + { |
| 1977 | + "condition": "[parameters('azureFunctionToolSupported')]", |
| 1978 | + "type": "Microsoft.Network/privateDnsZones", |
| 1979 | + "apiVersion": "2020-06-01", |
| 1980 | + "name": "[format('privatelink.queue.{0}', environment().suffixes.storage)]", |
| 1981 | + "location": "global" |
| 1982 | + }, |
1897 | 1983 | { |
1898 | 1984 | "type": "Microsoft.Network/privateDnsZones/virtualNetworkLinks", |
1899 | 1985 | "apiVersion": "2024-06-01", |
1900 | | - "name": "[format('{0}/{1}', format('privatelink.blob.{0}', environment().suffixes.storage), format('storage-{0}-link', parameters('suffix')))]", |
| 1986 | + "name": "[format('{0}/{1}', format('privatelink.blob.{0}', environment().suffixes.storage), format('storage-blob-{0}-link', parameters('suffix')))]", |
1901 | 1987 | "location": "global", |
1902 | 1988 | "properties": { |
1903 | 1989 | "virtualNetwork": { |
|
1909 | 1995 | "[resourceId('Microsoft.Network/privateDnsZones', format('privatelink.blob.{0}', environment().suffixes.storage))]" |
1910 | 1996 | ] |
1911 | 1997 | }, |
| 1998 | + { |
| 1999 | + "condition": "[parameters('azureFunctionToolSupported')]", |
| 2000 | + "type": "Microsoft.Network/privateDnsZones/virtualNetworkLinks", |
| 2001 | + "apiVersion": "2024-06-01", |
| 2002 | + "name": "[format('{0}/{1}', format('privatelink.queue.{0}', environment().suffixes.storage), format('storage-queue-{0}-link', parameters('suffix')))]", |
| 2003 | + "location": "global", |
| 2004 | + "properties": { |
| 2005 | + "virtualNetwork": { |
| 2006 | + "id": "[resourceId('Microsoft.Network/virtualNetworks', parameters('vnetName'))]" |
| 2007 | + }, |
| 2008 | + "registrationEnabled": false |
| 2009 | + }, |
| 2010 | + "dependsOn": [ |
| 2011 | + "[resourceId('Microsoft.Network/privateDnsZones', format('privatelink.queue.{0}', environment().suffixes.storage))]" |
| 2012 | + ] |
| 2013 | + }, |
1912 | 2014 | { |
1913 | 2015 | "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups", |
1914 | 2016 | "apiVersion": "2024-05-01", |
1915 | | - "name": "[format('{0}/{1}', format('{0}-private-endpoint', parameters('storageName')), format('{0}-dns-group', parameters('storageName')))]", |
| 2017 | + "name": "[format('{0}/{1}', format('{0}-blob-private-endpoint', parameters('storageName')), format('{0}-blob-dns-group', parameters('storageName')))]", |
1916 | 2018 | "properties": { |
1917 | 2019 | "privateDnsZoneConfigs": [ |
1918 | 2020 | { |
1919 | | - "name": "[format('{0}-dns-config', parameters('storageName'))]", |
| 2021 | + "name": "[format('{0}-blob-dns-config', parameters('storageName'))]", |
1920 | 2022 | "properties": { |
1921 | 2023 | "privateDnsZoneId": "[resourceId('Microsoft.Network/privateDnsZones', format('privatelink.blob.{0}', environment().suffixes.storage))]" |
1922 | 2024 | } |
|
1925 | 2027 | }, |
1926 | 2028 | "dependsOn": [ |
1927 | 2029 | "[resourceId('Microsoft.Network/privateDnsZones', format('privatelink.blob.{0}', environment().suffixes.storage))]", |
1928 | | - "[resourceId('Microsoft.Network/privateEndpoints', format('{0}-private-endpoint', parameters('storageName')))]" |
| 2030 | + "[resourceId('Microsoft.Network/privateEndpoints', format('{0}-blob-private-endpoint', parameters('storageName')))]" |
| 2031 | + ] |
| 2032 | + }, |
| 2033 | + { |
| 2034 | + "condition": "[parameters('azureFunctionToolSupported')]", |
| 2035 | + "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups", |
| 2036 | + "apiVersion": "2024-05-01", |
| 2037 | + "name": "[format('{0}/{1}', format('{0}-queue-private-endpoint', parameters('storageName')), format('{0}-queue-dns-group', parameters('storageName')))]", |
| 2038 | + "properties": { |
| 2039 | + "privateDnsZoneConfigs": [ |
| 2040 | + { |
| 2041 | + "name": "[format('{0}-queue-dns-config', parameters('storageName'))]", |
| 2042 | + "properties": { |
| 2043 | + "privateDnsZoneId": "[resourceId('Microsoft.Network/privateDnsZones', format('privatelink.queue.{0}', environment().suffixes.storage))]" |
| 2044 | + } |
| 2045 | + } |
| 2046 | + ] |
| 2047 | + }, |
| 2048 | + "dependsOn": [ |
| 2049 | + "[resourceId('Microsoft.Network/privateDnsZones', format('privatelink.queue.{0}', environment().suffixes.storage))]", |
| 2050 | + "[resourceId('Microsoft.Network/privateEndpoints', format('{0}-queue-private-endpoint', parameters('storageName')))]" |
1929 | 2051 | ] |
1930 | 2052 | }, |
1931 | 2053 | { |
|
0 commit comments