Skip to content

Commit

Permalink
chore(azure): restructure bicep files and gh actions (#311)
Browse files Browse the repository at this point in the history
Avhenger av #309 og relatert til #308.

Filene er flyttet til riktige mapper ref #308

Endret workflows til å matche strukturen vi har på backend. Gjorde om workflowsene til gjenbrukbare og lagde to nye filer ci-cd-main.yml og ci-cd-pull-request.yml som trigger på henholdsvis commits til main-branch og pull requests.
  • Loading branch information
arealmaas authored Mar 14, 2024
1 parent f40b6d0 commit bda95b9
Show file tree
Hide file tree
Showing 36 changed files with 51 additions and 401 deletions.
1 change: 1 addition & 0 deletions .azure/applications/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Applications will be added here
127 changes: 0 additions & 127 deletions .azure/deployBicep.ps1

This file was deleted.

30 changes: 15 additions & 15 deletions .azure/main.bicep → .azure/infrastructure/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
location: location
}

module keyVaultModule 'keyvault/create.bicep' = {
module keyVaultModule '../modules/keyvault/create.bicep' = {
scope: resourceGroup
name: 'keyVault'
params: {
Expand All @@ -28,7 +28,7 @@ module keyVaultModule 'keyvault/create.bicep' = {
}
}

module appConfiguration 'appConfiguration/create.bicep' = {
module appConfiguration '../modules/appConfiguration/create.bicep' = {
scope: resourceGroup
name: 'appConfiguration'
params: {
Expand All @@ -37,7 +37,7 @@ module appConfiguration 'appConfiguration/create.bicep' = {
}
}

module appInsights 'applicationInsights/create.bicep' = {
module appInsights '../modules/applicationInsights/create.bicep' = {
scope: resourceGroup
name: 'appInsights'
params: {
Expand All @@ -53,7 +53,7 @@ resource srcKeyVaultResource 'Microsoft.KeyVault/vaults@2022-11-01' existing = {
}

// Create resources with dependencies to other resources
module postgresql 'postgreSql/create.bicep' = {
module postgresql '../modules/postgreSql/create.bicep' = {
scope: resourceGroup
name: 'postgresql'
params: {
Expand All @@ -66,7 +66,7 @@ module postgresql 'postgreSql/create.bicep' = {
}
}

module copySecret 'keyvault/copySecrets.bicep' = {
module copySecret '../modules/keyvault/copySecrets.bicep' = {
scope: resourceGroup
name: 'copySecrets'
params: {
Expand All @@ -79,7 +79,7 @@ module copySecret 'keyvault/copySecrets.bicep' = {
}
}

module migrationJob 'migrationJob/create.bicep' = {
module migrationJob '../modules/migrationJob/create.bicep' = {
scope: resourceGroup
name: 'migrationJob'
params: {
Expand Down Expand Up @@ -129,7 +129,7 @@ module migrationJob 'migrationJob/create.bicep' = {
}
}

module appConfigConfigurations 'appConfiguration/upsertKeyValue.bicep' = {
module appConfigConfigurations '../modules/appConfiguration/upsertKeyValue.bicep' = {
scope: resourceGroup
name: 'AppConfig_Add_DialogDbConnectionString'
params: {
Expand All @@ -150,7 +150,7 @@ module appConfigConfigurations 'appConfiguration/upsertKeyValue.bicep' = {
// }
// }

module keyVaultReaderAccessPolicy 'keyvault/addReaderRoles.bicep' = {
module keyVaultReaderAccessPolicy '../modules/keyvault/addReaderRoles.bicep' = {
scope: resourceGroup
name: 'keyVaultReaderAccessPolicy'
params: {
Expand All @@ -169,7 +169,7 @@ module keyVaultReaderAccessPolicy 'keyvault/addReaderRoles.bicep' = {
// }
// }

module initContainerApp 'containerApp/init.bicep' = {
module initContainerApp '../modules/containerApp/init.bicep' = {
scope: resourceGroup
name: 'initContainerApp'
params: {
Expand All @@ -180,7 +180,7 @@ module initContainerApp 'containerApp/init.bicep' = {
}

}
module createMECertificate 'containerApp/createMECertificate.bicep' = {
module createMECertificate '../modules/containerApp/createMECertificate.bicep' = {
dependsOn: [ initContainerApp ]
scope: resourceGroup
name: 'createMECertificate'
Expand All @@ -189,7 +189,7 @@ module createMECertificate 'containerApp/createMECertificate.bicep' = {
location: location
}
}
module containerApp 'containerApp/addNECertufucateToContainer.bicep' = {
module containerApp '../modules/containerApp/addNECertufucateToContainer.bicep' = {
dependsOn: [ createMECertificate ]
scope: resourceGroup
name: 'containerApp'
Expand Down Expand Up @@ -245,15 +245,15 @@ module containerApp 'containerApp/addNECertufucateToContainer.bicep' = {

}

module customContainerAppRole 'customRoles/create.bicep' = {
module customContainerAppRole '../modules/customRoles/create.bicep' = {
scope: resourceGroup
name: 'customContainerAppRole'
params: {
assignableScope: resourceGroup.id
}
}

module assignContainerAppJobRoles 'customRoles/assign.bicep' = {
module assignContainerAppJobRoles '../modules/customRoles/assign.bicep' = {
scope: resourceGroup
name: 'assignContainerAppJobRoles'
params: {
Expand All @@ -262,7 +262,7 @@ module assignContainerAppJobRoles 'customRoles/assign.bicep' = {
}
}

module assignConfigReaderRole 'customRoles/assign.bicep' = {
module assignConfigReaderRole '../modules/customRoles/assign.bicep' = {
scope: resourceGroup
name: 'assignConfigReaderRole'
params: {
Expand All @@ -271,7 +271,7 @@ module assignConfigReaderRole 'customRoles/assign.bicep' = {
}
}

module appConfigReaderAccessPolicy 'appConfiguration/addReaderRoles.bicep' = {
module appConfigReaderAccessPolicy '../modules/appConfiguration/addReaderRoles.bicep' = {
scope: resourceGroup
name: 'appConfigReaderAccessPolicy'
params: {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
59 changes: 0 additions & 59 deletions .github/workflows/DeployTestFrontend.yml

This file was deleted.

Loading

0 comments on commit bda95b9

Please sign in to comment.