Skip to content

Commit

Permalink
Use the one resource group for the app and jobs (#793)
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell authored Sep 14, 2023
1 parent 809587d commit 77b8f16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
9 changes: 1 addition & 8 deletions server/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ param autoCompleteMergeStrategy string = 'Squash'
@description('Whether to automatically approve created pull requests.')
param autoApprove bool = false

@description('Name of the resource group where jobs will be created.')
param jobsResourceGroupName string = resourceGroup().name

@description('Password for Webhooks, ServiceHooks, and Notifications from Azure DevOps.')
#disable-next-line secure-secrets-in-params // need sensible defaults
param notificationsPassword string = uniqueString('service-hooks', resourceGroup().id) // e.g. zecnx476et7xm (13 characters)
Expand Down Expand Up @@ -287,11 +284,7 @@ resource app 'Microsoft.App/containerApps@2023-05-01' = {
value: 'https://${name}.${appEnvironment.properties.defaultDomain}/webhooks/azure'
}
{ name: 'Workflow__SubscriptionPassword', secretRef: 'notifications-password' }
{
name: 'Workflow__ResourceGroupId'
// Format: /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}
value: '${subscription().id}/resourceGroups/${jobsResourceGroupName}'
}
{ name: 'Workflow__ResourceGroupId', value: resourceGroup().id }
{
name: 'Workflow__LogAnalyticsWorkspaceId'
value: logAnalyticsWorkspace.properties.customerId
Expand Down
9 changes: 1 addition & 8 deletions server/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,6 @@
"description": "Whether to automatically approve created pull requests."
}
},
"jobsResourceGroupName": {
"type": "string",
"defaultValue": "[resourceGroup().name]",
"metadata": {
"description": "Name of the resource group where jobs will be created."
}
},
"notificationsPassword": {
"type": "string",
"defaultValue": "[uniqueString('service-hooks', resourceGroup().id)]",
Expand Down Expand Up @@ -440,7 +433,7 @@
},
{
"name": "Workflow__ResourceGroupId",
"value": "[format('{0}/resourceGroups/{1}', subscription().id, parameters('jobsResourceGroupName'))]"
"value": "[resourceGroup().id]"
},
{
"name": "Workflow__LogAnalyticsWorkspaceId",
Expand Down

0 comments on commit 77b8f16

Please sign in to comment.