SQLKeyVault

mail@pastecode.io avatar
unknown
plain_text
2 months ago
760 B
0
Indexable
Never
- stage: DeployToSQLDatabase
  dependsOn: tfdeploy
  condition: succeeded('tfdeploy')
  jobs:
  - job: RetrieveSecrets
    steps:
    - task: AzureKeyVault@2
      inputs:
        azureSubscription: $(serviceConnectionName)
        KeyVaultName: '<Your-Key-Vault-Name>'
        SecretsFilter: '*'
        RunAsPreJob: false

  - job: DeploySQLScripts
    steps:
    - task: SqlAzureDacpacDeployment@1
      inputs:
        azureSubscription: $(serviceConnectionName)
        ServerName: '<Azure-SQL-Server-Name>'
        DatabaseName: '<Database-Name>'
        SqlUsername: '$(SqlUsername)'  # Assuming stored in Key Vault
        SqlPassword: '$(SqlPassword)'  # Assuming stored in Key Vault
        ScriptPath: 'path/to/your/script.sql'
Leave a Comment