DrJohnT / AzureDevOpsExtensionsForSqlServer

Microsoft SQL Server deployment extensions for Azure DevOps Pipelines
MIT License
21 stars 14 forks source link

Enhancement | RunSqlCmdScriptsInFolder.ps1 | Azure SQL #11

Closed s-ahuja closed 3 years ago

s-ahuja commented 5 years ago

If you could expose all Authentication Types in Invoke-SqlCmd (AAD with U/P, Connection String) that will be great. Currently, we cannot use this extension if we want to provide username / password with AAD with Password authentication.

Refer: https://github.com/DrJohnT/AzureDevOpsExtensionsForSqlServer/blob/master/extensions/RunSqlCmdScripts/RunSqlCmdScriptsInFolderTask/RunSqlCmdScriptsInFolder.ps1

you can refer to how this works: https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/SqlAzureDacpacDeploymentV1/README.md

DrJohnT commented 3 years ago

Hi, I have now added the option to pass the username / password into the extension. However, this was done for SQL Server Authentication. Not sure if it works with Azure, but you could try.

Having read about "Connect to Azure SQL Databases (or Managed Instance) using a Managed Identity", I am not sure that would be possible within the DevOps extension. Tell me if you think otherwise.