diff --git a/server/main.bicep b/server/main.bicep index 8507abe1..31c2b1c3 100644 --- a/server/main.bicep +++ b/server/main.bicep @@ -141,7 +141,7 @@ resource providedServiceBusNamespace 'Microsoft.ServiceBus/namespaces@2021-11-01 } /* Storage Account */ -resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = if (eventBusTransport == 'QueueStorage' && !hasProvidedStorageAccount) { +resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = if (!hasProvidedStorageAccount) { name: '${name}-${collisionSuffix}' location: location kind: 'StorageV2' @@ -158,7 +158,7 @@ resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = if (eve } } } -resource providedStorageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' existing = if (eventBusTransport == 'QueueStorage' && hasProvidedStorageAccount) { +resource providedStorageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' existing = if (hasProvidedStorageAccount) { // Inspired by https://github.com/Azure/bicep/issues/1722#issuecomment-952118402 // Example: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Fabrikam/providers/Microsoft.Storage/storageAccounts/fabrikam // 0 -> '', 1 -> 'subscriptions', 2 -> '00000000-0000-0000-0000-000000000000', 3 -> 'resourceGroups' diff --git a/server/main.json b/server/main.json index 131b259c..a7b93c0c 100644 --- a/server/main.json +++ b/server/main.json @@ -52,14 +52,14 @@ "eventBusTransport": { "type": "string", "defaultValue": "ServiceBus", - "metadata": { - "description": "Merge strategy to use when setting auto complete on created pull requests." - }, "allowedValues": [ "InMemory", "ServiceBus", "QueueStorage" - ] + ], + "metadata": { + "description": "Merge strategy to use when setting auto complete on created pull requests." + } }, "failOnException": { "type": "bool", @@ -85,15 +85,15 @@ "autoCompleteMergeStrategy": { "type": "string", "defaultValue": "Squash", - "metadata": { - "description": "Merge strategy to use when setting auto complete on created pull requests." - }, "allowedValues": [ "NoFastForward", "Rebase", "RebaseMerge", "Squash" - ] + ], + "metadata": { + "description": "Merge strategy to use when setting auto complete on created pull requests." + } }, "autoApprove": { "type": "bool", @@ -105,12 +105,12 @@ "jobHostType": { "type": "string", "defaultValue": "ContainerInstances", - "metadata": { - "description": "Where to host new update jobs." - }, "allowedValues": [ "ContainerInstances" - ] + ], + "metadata": { + "description": "Where to host new update jobs." + } }, "jobsResourceGroupName": { "type": "string", @@ -185,20 +185,20 @@ "minReplicas": { "type": "int", "defaultValue": 1, + "minValue": 1, + "maxValue": 2, "metadata": { "description": "The minimum number of replicas" - }, - "maxValue": 2, - "minValue": 1 + } }, "maxReplicas": { "type": "int", "defaultValue": 1, + "minValue": 1, + "maxValue": 5, "metadata": { "description": "The maximum number of replicas" - }, - "maxValue": 5, - "minValue": 1 + } } }, "variables": { @@ -240,7 +240,7 @@ } }, { - "condition": "[and(equals(parameters('eventBusTransport'), 'QueueStorage'), not(variables('hasProvidedStorageAccount')))]", + "condition": "[not(variables('hasProvidedStorageAccount'))]", "type": "Microsoft.Storage/storageAccounts", "apiVersion": "2022-09-01", "name": "[format('{0}-{1}', parameters('name'), variables('collisionSuffix'))]",