Azure / sql-action

🚀 Deploy changes to your SQL database easily with SQL projects or SQL scripts and sql-action for GitHub workflows
MIT License
103 stars 58 forks source link

v2 - Remove client-id and tenant-id as inputs #124

Closed zijchen closed 2 years ago

zijchen commented 2 years ago

Fixes #119

Initial implementation of v2 used the tedious driver to test connection to database. For some reason their driver requires tenant-id and client-id to be explicitly set. However with go-sqlcmd implementation, this is no longer necessary.

Benjin commented 2 years ago

Why the change from tedious to go-sqlcmd?

Also, what situations were ClientId/TenantId required for? Were they supported before, and we're just making it explicit, or are they supported in some other way?

dzsquared commented 2 years ago

Why the change from tedious to go-sqlcmd?

Also, what situations were ClientId/TenantId required for? Were they supported before, and we're just making it explicit, or are they supported in some other way?

The current implementation (v1) utilizes sqlcmd, and through that it supports substituting sqlcmd variables into the scripts. While changing to tedious simplified the support for various AAD auth types with script execution, it broke the variable substitution capabilities of sqlcmd. Go-sqlcmd combines support for AAD auth types and sqlcmd variables