Set connection string in Azure DevOps pipeline
You can achieve this in several ways. Like Powershell scripts to replace the values and ofcourse this replace token extension
You should define your variable like below
{
"ConnectionStrings": {
"DefaultConnection": "#{connectstring}#"
}
}
During the deployment it will get replaced with your actual values.
Refer this SO for more details