This provides sample codes to backup and restore an Azure Key Vault secrets through the Logic App workflow.
- 한국어:
- English:
- Backup & Restore Key Vault Secrets via Azure Functions
- Accessing Key Vault from Azure Functions with Managed Identity
- Backup & Restore Key Vault Secrets via Logic Apps
- Accessing Key Vault from Logic App with Managed Identity
- Getting the Latest Array Item with Inline Script in Logic App
- Writing ARM Templates in YAML
- Introducing YARM CLI
- Separation of Concerns: Logic App from ARM Template
Connect-AzureRmAccount
az login
$rootDirectory = "[ROOT_DIRECTORY_OF_CLONED_REPOSITORY]"
Convert-Templates.ps1 -RootDirectory $rootDirectory
Run the ARM template deployment in the following order:
- Integration Account:
integrationAccount.json
- Storage Account:
storageAccount.json
- API Connection for Azure Blob:
connection.azureblob.json
- Logic App for backup:
logicApp.json
- Logic App for restore:
logicApp.json
- Key Vault for backup:
keyVault.json
- Key Vault for restore:
keyVault.json
New-AzureRmResourceGroupDeployment `
-Name "[DEPLOYMENT_NAME]" `
-ResourceGroupName "[RESOURCE_GROUP_NAME]"
-TemplateFile "integrationAccount.json" `
-TemplateParameterFile "integrationAccount.parameters.json" `
-Verbose
Set-LogicAppWorkflow.ps1 `
-ResourceGroupName "[RESOURCE_GROUP_NAME]" `
-LogicAppName "[LOGIC_APP_NAME]" `
-DefinitionFile "[WORKFLOW_DEFINITION_FILE]" `
-ParameterFile "[WORKFLOW_DEFINITION_PARAMETER_FILE]"
$secrets = @{ one = "lorem"; two = "ipsum"; three = "hello"; four = "workd"; }
Set-AzureKeyVaultSecrets.ps1 `
-KeyVaultName "[KEY_VAULT_INSTANCE_NAME]" `
-Secrets $secrets `
-IsLocal
Run the Logic App for backup, followed by Logic App for restore
Your contributions are always welcome! All your work should be done in your forked repository. Once you finish your work with corresponding tests, please send us a pull request onto our master
branch for review.
This is released under MIT License
The MIT License (MIT)
Copyright (c) 2019 Dev Kimchi
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.