{"id":23459463,"url":"https://github.com/devkimchi/key-vault-backup-restore-sample","last_synced_at":"2025-07-20T08:05:06.667Z","repository":{"id":84269885,"uuid":"219299008","full_name":"devkimchi/Key-Vault-Backup-Restore-Sample","owner":"devkimchi","description":"This provides sample codes to backup and restore an Azure Key Vault secrets","archived":false,"fork":false,"pushed_at":"2019-12-07T10:14:14.000Z","size":17382,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T23:40:36.522Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devkimchi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-03T12:41:15.000Z","updated_at":"2019-12-07T10:14:16.000Z","dependencies_parsed_at":"2023-05-24T05:00:32.601Z","dependency_job_id":null,"html_url":"https://github.com/devkimchi/Key-Vault-Backup-Restore-Sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devkimchi/Key-Vault-Backup-Restore-Sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkimchi%2FKey-Vault-Backup-Restore-Sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkimchi%2FKey-Vault-Backup-Restore-Sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkimchi%2FKey-Vault-Backup-Restore-Sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkimchi%2FKey-Vault-Backup-Restore-Sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devkimchi","download_url":"https://codeload.github.com/devkimchi/Key-Vault-Backup-Restore-Sample/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkimchi%2FKey-Vault-Backup-Restore-Sample/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266087790,"owners_count":23874519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-24T06:14:35.079Z","updated_at":"2025-07-20T08:05:06.641Z","avatar_url":"https://github.com/devkimchi.png","language":"C#","readme":"# Key Vault Backup \u0026 Restore Sample #\n\nThis provides sample codes to backup and restore an Azure Key Vault secrets through the Logic App workflow.\n\n\n## Prerequisites ##\n\n* [Azure Account (Free)](https://azure.microsoft.com/free/?WT.mc_id=devkimchicom-github-juyoo)\n* [Visual Studio Code](https://code.visualstudio.com/?WT.mc_id=devkimchicom-github-juyoo)\n\n\n## Readings ##\n\n* 한국어:\n  * [애저 펑션을 이용해서 애저 키 저장소 시크릿을 백업/복원하기](https://blog.aliencube.org/ko/2019/11/27/backup-restore-key-vault-secrets-via-function-apps/)\n  * [애저 펑션에서 Managed Identity를 이용해 애저 키 저장소에 접근하기](https://blog.aliencube.org/ko/2019/01/03/accessing-key-vault-from-azure-functions-with-managed-identity/)\n  * [로직 앱을 이용해서 애저 키 저장소 시크릿을 백업/복원하기](https://blog.aliencube.org/ko/2019/11/21/backup-restore-key-vault-secrets-via-logic-apps/)\n  * [애저 로직앱에서 키 저장소로 직접 접근하기](https://blog.aliencube.org/ko/2018/10/24/accessing-key-vault-from-logic-apps-with-managed-identity/)\n  * [로직 앱에서 인라인 스크립트를 이용해 배열의 가장 최근 값을 받아오기](https://blog.aliencube.org/ko/2019/11/14/getting-the-latest-array-item-with-inline-script-in-logic-app/)\n* English:\n  * [Backup \u0026 Restore Key Vault Secrets via Azure Functions](https://devkimchi.com/2019/11/27/backup-restore-key-vault-secrets-via-function-apps/)\n  * [Accessing Key Vault from Azure Functions with Managed Identity](https://devkimchi.com/2019/01/03/accessing-key-vault-from-azure-functions-with-managed-identity/)\n  * [Backup \u0026 Restore Key Vault Secrets via Logic Apps](https://devkimchi.com/2019/11/21/backup-restore-key-vault-secrets-via-logic-apps/)\n  * [Accessing Key Vault from Logic App with Managed Identity](https://devkimchi.com/2018/10/24/accessing-key-vault-from-logic-apps-with-managed-identity/)\n  * [Getting the Latest Array Item with Inline Script in Logic App](https://devkimchi.com/2019/11/14/getting-the-latest-array-item-with-inline-script-in-logic-app/)\n  * [Writing ARM Templates in YAML](https://devkimchi.com/2018/08/07/writing-arm-templates-in-yaml/)\n  * [Introducing YARM CLI](https://devkimchi.com/2018/08/04/introducing-yarm-cli/)\n  * [Separation of Concerns: Logic App from ARM Template](https://devkimchi.com/2018/06/14/separation-of-concerns-logic-app-from-arm-template/)\n\n\n## Getting Started ##\n\n### Login to Azure ###\n\n```powershell\nConnect-AzureRmAccount\n```\n\n```bash\naz login\n```\n\n\n### Convert ARM Templates in YAML to JSON ###\n\n```powershell\n$rootDirectory = \"[ROOT_DIRECTORY_OF_CLONED_REPOSITORY]\"\n\nConvert-Templates.ps1 -RootDirectory $rootDirectory\n```\n\n\n### Provision Resources through ARM Templates ###\n\nRun the ARM template deployment in the following order:\n\n1. Integration Account: `integrationAccount.json`\n1. Storage Account: `storageAccount.json`\n1. API Connection for Azure Blob: `connection.azureblob.json`\n1. Logic App for backup: `logicApp.json`\n1. Logic App for restore: `logicApp.json`\n1. Key Vault for backup: `keyVault.json`\n1. Key Vault for restore: `keyVault.json`\n\n```powershell\nNew-AzureRmResourceGroupDeployment `\n    -Name \"[DEPLOYMENT_NAME]\" `\n    -ResourceGroupName \"[RESOURCE_GROUP_NAME]\"\n    -TemplateFile \"integrationAccount.json\" `\n    -TemplateParameterFile \"integrationAccount.parameters.json\" `\n    -Verbose\n```\n\n\n### Add Workflow to Logic App ###\n\n```powershell\nSet-LogicAppWorkflow.ps1 `\n    -ResourceGroupName \"[RESOURCE_GROUP_NAME]\" `\n    -LogicAppName \"[LOGIC_APP_NAME]\" `\n    -DefinitionFile \"[WORKFLOW_DEFINITION_FILE]\" `\n    -ParameterFile \"[WORKFLOW_DEFINITION_PARAMETER_FILE]\"\n```\n\n\n### Add Sample Secrets to Key Vault ###\n\n```powershell\n$secrets = @{ one = \"lorem\"; two = \"ipsum\"; three = \"hello\"; four = \"workd\"; }\n\nSet-AzureKeyVaultSecrets.ps1 `\n    -KeyVaultName \"[KEY_VAULT_INSTANCE_NAME]\" `\n    -Secrets $secrets `\n    -IsLocal\n```\n\n\n### Run Logic Apps ###\n\nRun the Logic App for backup, followed by Logic App for restore\n\n\n## Contribution ##\n\nYour 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.\n\n\n## License ##\n\nThis is released under [MIT License](http://opensource.org/licenses/MIT)\n\n\u003e The MIT License (MIT)\n\u003e\n\u003e Copyright (c) 2019 [Dev Kimchi](https://devkimchi.com)\n\u003e \n\u003e 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:\n\u003e \n\u003e The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\u003e \n\u003e 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.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevkimchi%2Fkey-vault-backup-restore-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevkimchi%2Fkey-vault-backup-restore-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevkimchi%2Fkey-vault-backup-restore-sample/lists"}