Skip to content

Commit

Permalink
fix database access for migration job
Browse files Browse the repository at this point in the history
  • Loading branch information
Hammerbeck committed Jun 17, 2024
1 parent 70cdab4 commit 75c75b6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .azure/applications/migration/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ module addKeyvaultRead '../../modules/keyvault/addReaderRoles.bicep' = {
}
}

module databaseAccess '../../modules/postgreSql/AddAdministrationAccess.bicep' = {
name: 'databaseAccess'
dependsOn: [
addKeyvaultRead // Timing issue
]
params: {
tenantId: userAssignedIdentity.properties.tenantId
principalId: userAssignedIdentity.properties.principalId
appName: userAssignedIdentity.name
namePrefix: namePrefix
}
}

var secrets = [
{
name: migrationConnectionStringName
Expand Down
3 changes: 1 addition & 2 deletions .azure/modules/migrationJob/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ param containerAppEnvId string
param command string[]
param environmentVariables { name: string, value: string?, secretRef: string? }[] = []
param secrets { name: string, keyVaultUrl: string, identity: string }[] = []
param volumes { name: string, storageName: string, storageType: string, mountOptions: string}[] = []
param volumes { name: string, storageName: string, storageType: string, mountOptions: string }[] = []
param volumeMounts { mountPath: string, subPath: string, volumeName: string }[] = []
param principalId string

Expand Down Expand Up @@ -44,5 +44,4 @@ resource job 'Microsoft.App/jobs@2024-03-01' = {
}
}
}

output name string = job.name

0 comments on commit 75c75b6

Please sign in to comment.