Copying App Settings and Connection Strings Between Azure Web Apps
At Ritter Insurance Marketing we utilize Azure Web Apps for hosting many of our web applications. Azure Web Apps is a platform as a service (PaaS) offering from Microsoft, enabling their customers to host web applications without managing and maintaining the server infrastructure.
One difficulty we’ve encountered using Azure Web Apps is configuration difficulty arising from spinning up another copy of an application, whether for debugging or other purposes. Using the Azure portal in a web browser, copying app settings and connection strings is a tedious copy and paste process --- especially when there’s a bunch of them!
We prefer to work smarter, rather than harder. That said, we’re pleased to announce our cross-platform Azure Web App Configuration Copier tool for copying app settings and connection strings between applications!
First, you’ll need Node.js installed.
Next, the tool uses the Microsoft Azure Cross Platform Command Line tool, available on npm as azure-cli. With Node.js / npm installed, it’s as simple as
npm install -g azure-cli to install it globally — then use
azure login to authenticate and run
azure config mode asm to use the older mode this tool uses (it can be set back with
azure config mode arm).
Now that the prerequisites are ready, we can move onto installing and using the Azure Web App Configuration Copier tool. Do the following:
git clone email@example.com:ritterim/azure-web-app-configuration-copier.git(or navigate to the GitHub repository and download the repository manually)
We’re all set! Now, to run it:
> node main.js \ --sourceApp MySourceApp \ --destApp MyDestinationApp \ --subscription "My Subscription"
It’ll begin copying the app settings and connection strings. Be patient, it takes some time.
--subscription parameter is optional. If omitted, it will use the current subscription configured in the azure-cli.
Found a bug or have an idea? We welcome contributions at the GitHub repository.
We hope you find this tool useful!