Skip to content

Commit

Permalink
266 update bicep settings (#320)
Browse files Browse the repository at this point in the history
* chore: Update bicep template with additional ENV variables

* version bump
  • Loading branch information
mlhaufe authored Aug 11, 2024
1 parent 6fbd4e8 commit 9545cdd
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 24 deletions.
56 changes: 36 additions & 20 deletions .github/workflows/azure-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,24 @@ jobs:
resourceGroupName: ${{ secrets.AZURE_RG }}
template: ./azure/bicep/main.bicep
parameters: >
ghClientId=${{ secrets.GH_CLIENT_ID }}
ghClientSecret=${{ secrets.GH_CLIENT_SECRET }}
postgresDb=${{ secrets.POSTGRES_DB }}
postgresHost=${{ secrets.POSTGRES_HOST }}
postgresPassword=${{ secrets.POSTGRES_PASSWORD }}
postgresPort=${{ secrets.POSTGRES_PORT }}
postgresUser=${{ secrets.POSTGRES_USER }}
slackAdminMemberId=${{ secrets.SLACK_ADMIN_MEMBER_ID }}
slackBotToken=${{ secrets.SLACK_BOT_TOKEN }}
slackSigningSecret=${{ secrets.SLACK_SIGNING_SECRET }}
ghClientId="${{ secrets.GH_CLIENT_ID }}"
ghClientSecret="${{ secrets.GH_CLIENT_SECRET }}"
postgresDb="${{ secrets.POSTGRES_DB }}"
postgresHost="${{ secrets.POSTGRES_HOST }}"
postgresPassword="${{ secrets.POSTGRES_PASSWORD }}"
postgresPort="${{ secrets.POSTGRES_PORT }}"
postgresUser="${{ secrets.POSTGRES_USER }}"
slackAdminMemberId="${{ secrets.SLACK_ADMIN_MEMBER_ID }}"
slackBotToken="${{ secrets.SLACK_BOT_TOKEN }}"
slackSigningSecret="${{ secrets.SLACK_SIGNING_SECRET }}"
nuxtOrigin="${{ secrets.NUXT_ORIGIN }}"
nuxtSessionPassword="${{ secrets.NUXT_SESSION_PASSWORD }}"
nuxtAuthClientId="${{ secrets.NUXT_AUTH_CLIENT_ID }}"
nuxtAuthClientSecret="${{ secrets.NUXT_AUTH_CLIENT_SECRET }}"
nuxtAuthTenantName="${{ secrets.NUXT_AUTH_TENANT_NAME }}"
nuxtAuthTenantId="${{ secrets.NUXT_AUTH_TENANT_ID }}"
nuxtAuthAuthorityDomain="${{ secrets.NUXT_AUTH_AUTHORITY_DOMAIN }}"
nuxtAuthPrimaryUserFlow="${{ secrets.NUXT_AUTH_PRIMARY_USER_FLOW }}"
scope: 'resourcegroup'
deploymentMode: 'Incremental'
failOnStdErr: false
Expand Down Expand Up @@ -124,16 +132,24 @@ jobs:
template: ./azure/bicep/main.bicep
deploymentMode: 'Incremental'
parameters: >
ghClientId=${{ secrets.GH_CLIENT_ID }}
ghClientSecret=${{ secrets.GH_CLIENT_SECRET }}
postgresDb=${{ secrets.POSTGRES_DB }}
postgresHost=${{ secrets.POSTGRES_HOST }}
postgresPassword=${{ secrets.POSTGRES_PASSWORD }}
postgresPort=${{ secrets.POSTGRES_PORT }}
postgresUser=${{ secrets.POSTGRES_USER }}
slackAdminMemberId=${{ secrets.SLACK_ADMIN_MEMBER_ID }}
slackBotToken=${{ secrets.SLACK_BOT_TOKEN }}
slackSigningSecret=${{ secrets.SLACK_SIGNING_SECRET }}
ghClientId="${{ secrets.GH_CLIENT_ID }}"
ghClientSecret="${{ secrets.GH_CLIENT_SECRET }}"
postgresDb="${{ secrets.POSTGRES_DB }}"
postgresHost="${{ secrets.POSTGRES_HOST }}"
postgresPassword="${{ secrets.POSTGRES_PASSWORD }}"
postgresPort="${{ secrets.POSTGRES_PORT }}"
postgresUser="${{ secrets.POSTGRES_USER }}"
slackAdminMemberId="${{ secrets.SLACK_ADMIN_MEMBER_ID }}"
slackBotToken="${{ secrets.SLACK_BOT_TOKEN }}"
slackSigningSecret="${{ secrets.SLACK_SIGNING_SECRET }}"
nuxtOrigin="${{ secrets.NUXT_ORIGIN }}"
nuxtSessionPassword="${{ secrets.NUXT_SESSION_PASSWORD }}"
nuxtAuthClientId="${{ secrets.NUXT_AUTH_CLIENT_ID }}"
nuxtAuthClientSecret="${{ secrets.NUXT_AUTH_CLIENT_SECRET }}"
nuxtAuthTenantName="${{ secrets.NUXT_AUTH_TENANT_NAME }}"
nuxtAuthTenantId="${{ secrets.NUXT_AUTH_TENANT_ID }}"
nuxtAuthAuthorityDomain="${{ secrets.NUXT_AUTH_AUTHORITY_DOMAIN }}"
nuxtAuthPrimaryUserFlow="${{ secrets.NUXT_AUTH_PRIMARY_USER_FLOW }}"
scope: 'resourcegroup'
failOnStdErr: false
- name: logout
Expand Down
25 changes: 25 additions & 0 deletions azure/bicep/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ param slackAdminMemberId string
param slackBotToken string
@secure()
param slackSigningSecret string
@secure()
param nuxtOrigin string
@secure()
param nuxtSessionPassword string
@secure()
param nuxtAuthClientId string
@secure()
param nuxtAuthClientSecret string
@secure()
param nuxtAuthTenantName string
@secure()
param nuxtAuthTenantId string
@secure()
param nuxtAuthAuthorityDomain string
@secure()
param nuxtAuthPrimaryUserFlow string

module appInsights './modules/appInsights.bicep' = {
name: 'appInsights'
Expand Down Expand Up @@ -66,5 +82,14 @@ module appService './modules/appService.bicep' = {
slackAdminMemberId: slackAdminMemberId
slackBotToken: slackBotToken
slackSigningSecret: slackSigningSecret
nodeEnv: 'production'
nuxtAuthAuthorityDomain: nuxtAuthAuthorityDomain
nuxtAuthClientId: nuxtAuthClientId
nuxtAuthClientSecret: nuxtAuthClientSecret
nuxtAuthPrimaryUserFlow: nuxtAuthPrimaryUserFlow
nuxtAuthTenantId: nuxtAuthTenantId
nuxtAuthTenantName: nuxtAuthTenantName
nuxtOrigin: nuxtOrigin
nuxtSessionPassword: nuxtSessionPassword
}
}
51 changes: 50 additions & 1 deletion azure/bicep/modules/appService.bicep
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
param name string
param location string
param appInsightsInstrumentationKey string
param nodeEnv string
@secure()
param appInsightsConnectionString string
@secure()
Expand All @@ -23,6 +24,22 @@ param slackAdminMemberId string
param slackBotToken string
@secure()
param slackSigningSecret string
@secure()
param nuxtOrigin string
@secure()
param nuxtSessionPassword string
@secure()
param nuxtAuthClientId string
@secure()
param nuxtAuthClientSecret string
@secure()
param nuxtAuthTenantName string
@secure()
param nuxtAuthTenantId string
@secure()
param nuxtAuthAuthorityDomain string
@secure()
param nuxtAuthPrimaryUserFlow string

resource appServicePlan 'Microsoft.Web/serverfarms@2023-12-01' = {
name: toLower('plan-${name}')
Expand Down Expand Up @@ -128,7 +145,39 @@ resource appService 'Microsoft.Web/sites@2023-12-01' = {
}
{
name: 'NODE_ENV'
value: 'production'
value: nodeEnv
}
{
name: 'NUXT_ORIGIN'
value: nuxtOrigin
}
{
name: 'NUXT_SESSION_PASSWORD'
value: nuxtSessionPassword
}
{
name: 'NUXT_AUTH_CLIENT_ID'
value: nuxtAuthClientId
}
{
name: 'NUXT_AUTH_CLIENT_SECRET'
value: nuxtAuthClientSecret
}
{
name: 'NUXT_AUTH_TENANT_NAME'
value: nuxtAuthTenantName
}
{
name: 'NUXT_AUTH_TENANT_ID'
value: nuxtAuthTenantId
}
{
name: 'NUXT_AUTH_AUTHORITY_DOMAIN'
value: nuxtAuthAuthorityDomain
}
{
name: 'NUXT_AUTH_PRIMARY_USER_FLOW'
value: nuxtAuthPrimaryUserFlow
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@final-hill/cathedral",
"version": "0.12.1",
"version": "0.12.2",
"description": "Requirements management system",
"keywords": [],
"private": true,
Expand Down

0 comments on commit 9545cdd

Please sign in to comment.