How to control development/prod/staging application settings using azure functions?

0 votes

I want to control app settings using azure functions depending upon the environment it is in. I want to change between the appsettings.json file, for eg if it's the development environment, the appsettings.development.json file be used.

From what I've read in the docs I can see that you can set up config in the azure portal but can't find anything to set it in the solution. Is there any way to manage these build environments?

May 10, 2018 in DevOps on Cloud by Atul
• 5,530 points
277 views

1 answer to this question.

0 votes

You should use a build-release system like VSTS. Try creating an ARM template of your app and deploy this pipeline with VSTS. You can add value to the template.json file like here:

"appSettings": [
    // other entries
    {
        "name": "MyValue",
        "value": "[parameters('myValue')]"
    }

You'll require parameters.json which will hold the values:

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "name": {},
        "storageName": {},
        "location": {},
        "subscriptionId": {}
    }
}

And change the values of these parameters in VSTS portal.

override parameters

This way you'll be able to implement a CI/CD pipeline used by professional sys admins.

answered May 10, 2018 by ajs3033
• 7,280 points

Related Questions In DevOps on Cloud

0 votes
1 answer

How to manage Application version for VM's in Azure Autoscaling group

First of all, You have to launch ...READ MORE

answered Apr 23, 2018 in DevOps on Cloud by shubham
• 6,890 points
65 views
0 votes
1 answer

How to deploy compiled elements Azure Web App with Appveyor?

Add the following BeforeBuild target to Web ...READ MORE

answered Jul 12, 2018 in DevOps on Cloud by Kalgi
• 2,620 points
33 views
+2 votes
0 answers

Using .ebextensions to run commands while deploying the app in dev/uat/prod

Hey, We earlier had a plaintext credentials in ...READ MORE

Sep 10 in DevOps on Cloud by Sai
55 views
+2 votes
3 answers

How do I deploy Scala PlayFramework Project to IBM Bluemix

It seems that they are more than ...READ MORE

answered Oct 18, 2018 in DevOps on Cloud by lina
• 8,110 points
114 views
0 votes
1 answer
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
150 views
0 votes
1 answer
0 votes
1 answer

How can I remove a port from url for node app using nginx

If you run your node server on ...READ MORE

answered Apr 10, 2018 in DevOps on Cloud by ajs3033
• 7,280 points
502 views