Created
June 28, 2022 07:47
-
-
Save michmzr/2beda67bc534d9bef0c63b4dfe287736 to your computer and use it in GitHub Desktop.
Azure app service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generates a JSON with valid format of Azure App Service enviroment variables - https://docs.microsoft.com/en-us/azure/app-service/configure-common?tabs=portal | |
# Script uses json with env variables in format {"ENV_NAME": "ENV_VALUE",...} | |
import json | |
# Opening JSON file | |
f = open("env.json") | |
# returns JSON object as | |
# a dictionary | |
data = json.load(f) | |
azureAppServiceEnv = [] | |
for key in data: | |
azureAppServiceEnv.append({ | |
"name": key, | |
"value": data[key], | |
"slotSetting": "false" | |
}) | |
# Closing file | |
print(json.dumps(azureAppServiceEnv)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment