0

I am using the Azure CLI to interact with my Azure Functions. I want to be able to read the appsettings.json file that was deployed with the function app. You can see this file if you're using the App Service Editor.

enter image description here

From what I have seen so far, I could use the az functionapp config appsettings set command but that will only read the appsettings on the function app and not the custom appsettings.json file.

How would one go in accomplishing this?

1
  • Have you try my solution? Any doubts about that? Commented Nov 21, 2019 at 1:24

1 Answer 1

2

Although I don't recommend doing this on Azure, if you really want to know, I think this should meet your requirements:

Get the content:

$json = Get-Content 'appsettings.json' | Out-String | ConvertFrom-Json

Show the content:

$json

Add the value:

$json | Add-Member -Type NoteProperty -Name 'Key' -Value 'Value'
$json | ConvertTo-Json | Set-Content 'appsettings.json'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.