|
5 | 5 | "_generator": { |
6 | 6 | "name": "bicep", |
7 | 7 | "version": "0.34.44.8038", |
8 | | - "templateHash": "16954169516642030194" |
| 8 | + "templateHash": "6194079026370260064" |
9 | 9 | } |
10 | 10 | }, |
11 | 11 | "parameters": { |
|
93 | 93 | "imageTag": { |
94 | 94 | "type": "string", |
95 | 95 | "defaultValue": "latest_migrated" |
| 96 | + }, |
| 97 | + "AZURE_LOCATION": { |
| 98 | + "type": "string", |
| 99 | + "defaultValue": "" |
96 | 100 | } |
97 | 101 | }, |
98 | 102 | "variables": { |
99 | 103 | "azureOpenAIApiVersion": "2024-02-15-preview", |
100 | | - "uniqueId": "[toLower(uniqueString(subscription().id, parameters('environmentName'), resourceGroup().location))]", |
101 | | - "solutionPrefix": "[format('km{0}', padLeft(take(variables('uniqueId'), 12), 12, '0'))]", |
102 | | - "resourceGroupLocation": "[resourceGroup().location]", |
103 | | - "solutionLocation": "[variables('resourceGroupLocation')]" |
| 104 | + "solutionLocation": "[if(empty(parameters('AZURE_LOCATION')), resourceGroup().location, parameters('AZURE_LOCATION'))]", |
| 105 | + "uniqueId": "[toLower(uniqueString(subscription().id, parameters('environmentName'), variables('solutionLocation')))]", |
| 106 | + "solutionPrefix": "[format('km{0}', padLeft(take(variables('uniqueId'), 12), 12, '0'))]" |
104 | 107 | }, |
105 | 108 | "resources": [ |
106 | 109 | { |
|
227 | 230 | "value": "[variables('solutionPrefix')]" |
228 | 231 | }, |
229 | 232 | "solutionLocation": { |
230 | | - "value": "[variables('resourceGroupLocation')]" |
| 233 | + "value": "[variables('solutionLocation')]" |
231 | 234 | }, |
232 | 235 | "managedIdentityObjectId": { |
233 | 236 | "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_managed_identity'), '2022-09-01').outputs.managedIdentityOutput.value.objectId]" |
|
349 | 352 | "value": "[variables('solutionPrefix')]" |
350 | 353 | }, |
351 | 354 | "solutionLocation": { |
352 | | - "value": "[variables('resourceGroupLocation')]" |
| 355 | + "value": "[variables('solutionLocation')]" |
353 | 356 | }, |
354 | 357 | "keyVaultName": { |
355 | 358 | "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_keyvault'), '2022-09-01').outputs.keyvaultName.value]" |
|
1595 | 1598 | "parameters": { |
1596 | 1599 | "solutionName": { |
1597 | 1600 | "value": "[variables('solutionPrefix')]" |
| 1601 | + }, |
| 1602 | + "solutionLocation": { |
| 1603 | + "value": "[variables('solutionLocation')]" |
1598 | 1604 | } |
1599 | 1605 | }, |
1600 | 1606 | "template": { |
|
1604 | 1610 | "_generator": { |
1605 | 1611 | "name": "bicep", |
1606 | 1612 | "version": "0.34.44.8038", |
1607 | | - "templateHash": "5000589525239764864" |
| 1613 | + "templateHash": "9333076050504873128" |
1608 | 1614 | }, |
1609 | 1615 | "description": "Creates an Azure App Service plan." |
1610 | 1616 | }, |
1611 | 1617 | "parameters": { |
1612 | 1618 | "solutionName": { |
1613 | 1619 | "type": "string" |
1614 | 1620 | }, |
| 1621 | + "solutionLocation": { |
| 1622 | + "type": "string", |
| 1623 | + "metadata": { |
| 1624 | + "description": "Solution Location" |
| 1625 | + } |
| 1626 | + }, |
1615 | 1627 | "HostingPlanName": { |
1616 | 1628 | "type": "string", |
1617 | 1629 | "defaultValue": "[format('{0}-app-service-plan', parameters('solutionName'))]", |
|
1647 | 1659 | "type": "Microsoft.Web/serverfarms", |
1648 | 1660 | "apiVersion": "2020-06-01", |
1649 | 1661 | "name": "[parameters('HostingPlanName')]", |
1650 | | - "location": "[resourceGroup().location]", |
| 1662 | + "location": "[parameters('solutionLocation')]", |
1651 | 1663 | "sku": { |
1652 | 1664 | "name": "[parameters('HostingPlanSku')]" |
1653 | 1665 | }, |
|
1681 | 1693 | }, |
1682 | 1694 | "mode": "Incremental", |
1683 | 1695 | "parameters": { |
| 1696 | + "solutionLocation": { |
| 1697 | + "value": "[variables('solutionLocation')]" |
| 1698 | + }, |
1684 | 1699 | "imageTag": { |
1685 | 1700 | "value": "[parameters('imageTag')]" |
1686 | 1701 | }, |
|
1753 | 1768 | "_generator": { |
1754 | 1769 | "name": "bicep", |
1755 | 1770 | "version": "0.34.44.8038", |
1756 | | - "templateHash": "14001159014642291962" |
| 1771 | + "templateHash": "14415535620383822032" |
1757 | 1772 | } |
1758 | 1773 | }, |
1759 | 1774 | "parameters": { |
|
1766 | 1781 | "solutionName": { |
1767 | 1782 | "type": "string" |
1768 | 1783 | }, |
| 1784 | + "solutionLocation": { |
| 1785 | + "type": "string", |
| 1786 | + "metadata": { |
| 1787 | + "description": "Solution Location" |
| 1788 | + } |
| 1789 | + }, |
1769 | 1790 | "appSettings": { |
1770 | 1791 | "type": "secureObject", |
1771 | 1792 | "defaultValue": {} |
|
1834 | 1855 | "solutionName": { |
1835 | 1856 | "value": "[variables('name')]" |
1836 | 1857 | }, |
| 1858 | + "solutionLocation": { |
| 1859 | + "value": "[parameters('solutionLocation')]" |
| 1860 | + }, |
1837 | 1861 | "appServicePlanId": { |
1838 | 1862 | "value": "[parameters('appServicePlanId')]" |
1839 | 1863 | }, |
|
1854 | 1878 | "_generator": { |
1855 | 1879 | "name": "bicep", |
1856 | 1880 | "version": "0.34.44.8038", |
1857 | | - "templateHash": "356166454386735487" |
| 1881 | + "templateHash": "13414794767040680839" |
1858 | 1882 | } |
1859 | 1883 | }, |
1860 | 1884 | "parameters": { |
|
1864 | 1888 | "description": "Solution Name" |
1865 | 1889 | } |
1866 | 1890 | }, |
| 1891 | + "solutionLocation": { |
| 1892 | + "type": "string", |
| 1893 | + "metadata": { |
| 1894 | + "description": "Solution Location" |
| 1895 | + } |
| 1896 | + }, |
1867 | 1897 | "appSettings": { |
1868 | 1898 | "type": "secureObject", |
1869 | 1899 | "defaultValue": {} |
|
1906 | 1936 | "type": "Microsoft.Web/sites", |
1907 | 1937 | "apiVersion": "2020-06-01", |
1908 | 1938 | "name": "[parameters('solutionName')]", |
1909 | | - "location": "[resourceGroup().location]", |
| 1939 | + "location": "[parameters('solutionLocation')]", |
1910 | 1940 | "identity": "[if(equals(parameters('userassignedIdentityId'), ''), createObject('type', 'SystemAssigned'), createObject('type', 'SystemAssigned, UserAssigned', 'userAssignedIdentities', createObject(format('{0}', parameters('userassignedIdentityId')), createObject())))]", |
1911 | 1941 | "properties": { |
1912 | 1942 | "serverFarmId": "[parameters('appServicePlanId')]", |
|
2044 | 2074 | }, |
2045 | 2075 | "mode": "Incremental", |
2046 | 2076 | "parameters": { |
| 2077 | + "solutionLocation": { |
| 2078 | + "value": "[variables('solutionLocation')]" |
| 2079 | + }, |
2047 | 2080 | "imageTag": { |
2048 | 2081 | "value": "[parameters('imageTag')]" |
2049 | 2082 | }, |
|
2069 | 2102 | "_generator": { |
2070 | 2103 | "name": "bicep", |
2071 | 2104 | "version": "0.34.44.8038", |
2072 | | - "templateHash": "13062487122244574247" |
| 2105 | + "templateHash": "5253697335871068015" |
2073 | 2106 | } |
2074 | 2107 | }, |
2075 | 2108 | "parameters": { |
|
2082 | 2115 | "solutionName": { |
2083 | 2116 | "type": "string" |
2084 | 2117 | }, |
| 2118 | + "solutionLocation": { |
| 2119 | + "type": "string", |
| 2120 | + "metadata": { |
| 2121 | + "description": "Solution Location" |
| 2122 | + } |
| 2123 | + }, |
2085 | 2124 | "appSettings": { |
2086 | 2125 | "type": "secureObject", |
2087 | 2126 | "defaultValue": {} |
|
2105 | 2144 | }, |
2106 | 2145 | "mode": "Incremental", |
2107 | 2146 | "parameters": { |
| 2147 | + "solutionLocation": { |
| 2148 | + "value": "[parameters('solutionLocation')]" |
| 2149 | + }, |
2108 | 2150 | "solutionName": { |
2109 | 2151 | "value": "[variables('name')]" |
2110 | 2152 | }, |
|
2125 | 2167 | "_generator": { |
2126 | 2168 | "name": "bicep", |
2127 | 2169 | "version": "0.34.44.8038", |
2128 | | - "templateHash": "356166454386735487" |
| 2170 | + "templateHash": "13414794767040680839" |
2129 | 2171 | } |
2130 | 2172 | }, |
2131 | 2173 | "parameters": { |
|
2135 | 2177 | "description": "Solution Name" |
2136 | 2178 | } |
2137 | 2179 | }, |
| 2180 | + "solutionLocation": { |
| 2181 | + "type": "string", |
| 2182 | + "metadata": { |
| 2183 | + "description": "Solution Location" |
| 2184 | + } |
| 2185 | + }, |
2138 | 2186 | "appSettings": { |
2139 | 2187 | "type": "secureObject", |
2140 | 2188 | "defaultValue": {} |
|
2177 | 2225 | "type": "Microsoft.Web/sites", |
2178 | 2226 | "apiVersion": "2020-06-01", |
2179 | 2227 | "name": "[parameters('solutionName')]", |
2180 | | - "location": "[resourceGroup().location]", |
| 2228 | + "location": "[parameters('solutionLocation')]", |
2181 | 2229 | "identity": "[if(equals(parameters('userassignedIdentityId'), ''), createObject('type', 'SystemAssigned'), createObject('type', 'SystemAssigned, UserAssigned', 'userAssignedIdentities', createObject(format('{0}', parameters('userassignedIdentityId')), createObject())))]", |
2182 | 2230 | "properties": { |
2183 | 2231 | "serverFarmId": "[parameters('appServicePlanId')]", |
|
2314 | 2362 | }, |
2315 | 2363 | "RESOURCE_GROUP_LOCATION": { |
2316 | 2364 | "type": "string", |
2317 | | - "value": "[variables('resourceGroupLocation')]" |
| 2365 | + "value": "[variables('solutionLocation')]" |
2318 | 2366 | }, |
2319 | 2367 | "ENVIRONMENT_NAME": { |
2320 | 2368 | "type": "string", |
|
0 commit comments