Skip to content

Tool to sync all webapp environments, settings, and secrets into local dotnet user secrets

License

Notifications You must be signed in to change notification settings

mhdbouk/azure-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure Sync Settings

This script retrieves environment variables from an Azure App Service and adds them to your local .NET secrets. If the environment variable value is a reference to an Azure KeyVault secret, the script retrieves the actual secret value from Azure KeyVault.

image

image

Prerequisites

Installation

  1. Clone this repository and navigate to the directory containing azure-sync.sh and install.sh.

    git clone https://github.com/mhdbouk/azure-sync
    cd azure-sync
  2. Run the installation script.

    chmod +x ./install.sh && ./install.sh

    This will copy azure-sync.sh to /usr/local/bin and make it executable.

Usage

  1. Run the script within your .NET application, passing your Azure App Service name and resource group as arguments.

    azure-sync <appname> <app_resource_group>

    Replace <appname> with the name of your Azure App Service and <app_resource_group> with the name of the resource group your App Service is in.

  2. The script will retrieve all environment variables from the specified Azure App Service, including any Azure KeyVault secrets, and add them to your local .NET secrets.

Notes

  • You must be logged in to the Azure CLI with an account that has access to the specified Azure App Service and any referenced Azure KeyVaults.
  • The script replaces double underscores (__) in environment variable names with colons (:) to match the .NET Core configuration key format.

About

Tool to sync all webapp environments, settings, and secrets into local dotnet user secrets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages