Skip to content

Commit

Permalink
Try to disable instead of deleting connection string
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathanio123 committed Nov 7, 2024
1 parent cbfc810 commit 901774c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pipelines/environment-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ stages:
azureSubscription: 'FRA Automation Non-Prod'
coreAzureSubscription: 'PROJECT_PORTAL (63b791ae-b2bc-41a1-ac66-806c4e69bffe)'

## To get the pr slots to talk to the correct databases, we need to disable the key vault secret for connection string.
## The secret would override the direct env property used to target the correct db.
- task: AzurePowerShell@5
displayName: 'Remove db connection string secret'
inputs:
azureSubscription: 'PROJECT_PORTAL (63b791ae-b2bc-41a1-ac66-806c4e69bffe)'
ScriptType: InlineScript
FailOnStandardError: true
azurePowerShellVersion: 'LatestVersion'
Inline: |
Write-Host "Disabling secret @ kv-fap-resources-pr/ConnectionStrings--ResourcesDbContext"
Update-AzKeyVaultSecret -VaultName kv-fap-resources-pr -Name ConnectionStrings--ResourcesDbContext -Enable $False
- stage: DeployQA
displayName: QA Azure Infra
Expand Down

0 comments on commit 901774c

Please sign in to comment.