I've deployed an Azure Web App and Azure SQL Database using PowerShell. At the moment I have the following code with a dummy value that sets a sql connection string for my web app:
$connectionStrings = @{
"sqlConnection"= @{
"value"="placeholder";
"type"="3"
}
}
I would like to be able to enter a proper sql connection string for my azure sql database, like the following: Server=tcp:example.database.useastcloudapi.net;Database=ExampleDB;User Id=Admin;Password=Something123!;
The issue im having is entering/referencing the variables I've created containing the sql user account, password and server FQDN into the connection string value above. Ideally, I'd like to do something like the following (I know that its incorrect but I want to reference the variables im using):
$connectionStrings = @{
"sqlConnection"= @{
"value"="Server=tcp:"[$sqlServer];"Database="[$sqlDatabase];"User Id="[$sqlUser];
"type"="3"
}
}
I don't have much experience with powershell and im not a developer so I would appreciate any help or suggestions.
Thanks!