azure-functionscsx

How to prevent code changes to Azure Function script (.csx)


Is there a way to lock, or make .csx functions read-only?

I have been developing against the Azure Functions platform for a number of years, and have always developed them in a classic "Project" style assembly, deployed the project to a stage through CI/CD, etc etc.

I'm looking at putting "utility" type functions in a new consumption plan, and writing the code right in the portal in the .csx file. Kinda neat - but fast and loose!

I can't seem to find any option (or search result!) on how you can "lock" at least prevent code changes to one of these functions in case of fat fingering, or accidental edits.


Solution

  • Follow this steps can then your crx function app will be read only.

    First, go to function app settings.

    enter image description here

    Second, select Read Only in 'Function app edit mode'.

    enter image description here