Copying App Settings and Connection Strings Between Azure Web Apps

Written by Ken Dale
2
This post is days old.

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!

Getting started

The Azure Web App Configuration Copier tool is a command line tool built on JavaScript / Node.js.

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.

Now that the prerequisites are ready, we can move onto installing and using the Azure Web App Configuration Copier tool. Do the following:

  1. git clone [email protected]:ritterim/azure-web-app-configuration-copier.git (or navigate to the GitHub repository and download the repository manually)
  2. cd azure-web-app-configuration-copier
  3. npm install

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.

Note: The --subscription parameter is optional. If omitted, it will use the current subscription configured in the azure-cli.

Contributions

Found a bug or have an idea? We welcome contributions at the GitHub repository.


We hope you find this tool useful!

Suggested reading

Comments