Skip to content

Commit

Permalink
update: bicep params
Browse files Browse the repository at this point in the history
  • Loading branch information
alguadam committed Nov 1, 2024
1 parent 14bb1c9 commit 0e8fb76
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ie-bank-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ jobs:
subscriptionId: ${{ env.SUBSCRIPTION_ID_DEV }}
resourceGroupName: ${{ env.RESOURCE_GROUP_DEV }}
template: ./main.bicep
parameters: ./parameters/dev.parameters.json appServiceAPIEnvVarENV=${{ vars.ENV }} appServiceAPIEnvVarDBHOST=${{ vars.DBHOST }} appServiceAPIEnvVarDBNAME=${{ vars.DBNAME }} appServiceAPIEnvVarDBPASS=${{ secrets.DBPASS }} appServiceAPIDBHostDBUSER=${{ secrets.DBUSER }} appServiceAPIDBHostFLASK_APP=${{ vars.FLASK_APP }} appServiceAPIDBHostFLASK_DEBUG=${{ vars.FLASK_DEBUG }}
deploymentName: ${{ env.USER_ALIAS }}
parameters: ./parameters/dev.bicepparam appServiceAPIEnvVarDBPASS=${{ secrets.DBPASS }} appServiceAPIDBHostDBUSER=${{ secrets.DBUSER }}
deploymentName: ${{ env.USER_ALIAS }}-dev

deploy-uat:
# if: github.ref == 'refs/heads/dev'
if: (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main') || github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [build,deploy-dev]
environment:
Expand All @@ -75,5 +75,5 @@ jobs:
subscriptionId: ${{ env.SUBSCRIPTION_ID_DEV }}
resourceGroupName: ${{ env.RESOURCE_GROUP_DEV }}
template: ./main.bicep
parameters: ./parameters/uat.parameters.json appServiceAPIEnvVarENV=${{ vars.ENV }} appServiceAPIEnvVarDBHOST=${{ vars.DBHOST }} appServiceAPIEnvVarDBNAME=${{ vars.DBNAME }} appServiceAPIEnvVarDBPASS=${{ secrets.DBPASS }} appServiceAPIDBHostDBUSER=${{ secrets.DBUSER }} appServiceAPIDBHostFLASK_APP=${{ vars.FLASK_APP }} appServiceAPIDBHostFLASK_DEBUG=${{ vars.FLASK_DEBUG }}
parameters: ./parameters/uat.bicepparam appServiceAPIEnvVarDBPASS=${{ secrets.DBPASS }} appServiceAPIDBHostDBUSER=${{ secrets.DBUSER }}
deploymentName: ${{ env.USER_ALIAS }}-uat
16 changes: 16 additions & 0 deletions parameters/dev.bicepparam
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using '../main.bicep'

param environmentType = 'nonprod'
param postgreSQLServerName = 'aguadamillas-dbsrv-dev'
param postgreSQLDatabaseName = 'aguadamillas-db-dev'
param appServicePlanName = 'aguadamillas-asp-dev'
param appServiceAPIAppName = 'aguadamillas-be-dev'
param appServiceAppName = 'aguadamillas-fe-dev'
param location = 'North Europe'
param appServiceAPIDBHostFLASK_APP = 'iebank_api\\__init__.py'
param appServiceAPIDBHostFLASK_DEBUG = '1'
param appServiceAPIDBHostDBUSER = 'github-secret-replaced-in-workflow'
param appServiceAPIEnvVarDBPASS = 'github-secret-replaced-in-workflow'
param appServiceAPIEnvVarDBHOST = 'aguadamillas-dbsrv-dev.postgres.database.azure.com'
param appServiceAPIEnvVarDBNAME = 'aguadamillas-db-dev'
param appServiceAPIEnvVarENV = 'dev'
16 changes: 16 additions & 0 deletions parameters/uat.bicepparam
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using '../main.bicep'

param environmentType = 'nonprod'
param postgreSQLServerName = 'aguadamillas-dbsrv-uat'
param postgreSQLDatabaseName = 'aguadamillas-db-uat'
param appServicePlanName = 'aguadamillas-asp-uat'
param appServiceAPIAppName = 'aguadamillas-be-uat'
param appServiceAppName = 'aguadamillas-fe-uat'
param location = 'North Europe'
param appServiceAPIDBHostFLASK_APP = 'iebank_api\\__init__.py'
param appServiceAPIDBHostFLASK_DEBUG = '1'
param appServiceAPIDBHostDBUSER = 'github-secret-replaced-in-workflow'
param appServiceAPIEnvVarDBPASS = 'github-secret-replaced-in-workflow'
param appServiceAPIEnvVarDBHOST = 'aguadamillas-dbsrv-uat.postgres.database.azure.com'
param appServiceAPIEnvVarDBNAME = 'aguadamillas-db-uat'
param appServiceAPIEnvVarENV = 'uat'

0 comments on commit 0e8fb76

Please sign in to comment.