I am trying automate the creation of users in a Synapse Dedicated SQL Pool. Building and integrating a DACPAC in an Azure DevOps pipeline works as described in the Microsoft Documentation. The problem is, that i want to specify the username at build-time of the DACPAC as using an SQLCMD variable as follows:
CREATE USER [$(TestUserName)] FROM EXTERNAL PROVIDER;
This throws the following build error:
SQL70604: SqlCmd variable reference is not allowed in object names ($(TestUserName)).
Am I taking a completely wrong approach to the problem, or does anybody know how to get this working?