azure-functionsazure-cli

How can i set the scm publishing and ftp in an Azure function App using azure cli?


I want to set the SCM and FTP on my Azure function app using azure cli.

I have tried the following

 az functionapp config set --name $FUNCTION_APP_NAME --resource-group $RESOURCE_GROUP  --ftp-publishing-enabled true

az functionapp config set --name $FUNCTION_APP_NAME --resource-group $RESOURCE_GROUP --scm-publishing-enabled true

But says that --ftp-publishing-enabled and --scm-publishing-enabled are unrecognized arguments.

How can i set these values ?


Solution

  • I have created the Consumption Model Azure Function App where these are the settings related to SCM and FTP came as default:

    enter image description here

    To change these settings using Azure CLI, below are the commands and its execution:

    FTP Setting:

    az webapp config set --name <app-name> --resource-group <group-name> --ftps-state FtpsOnly
    

    Possible values for –ftps-state are:

    enter image description here

    SCM Setting:

    az resource update --resource-group dkamaxxxx --name scm --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/fapp-cons-dkam-si-01 --set properties.allow=false
    

    enter image description here

    For your reference: MS Doc on Azure CLI Commands for FTP Setting and SCM Setting.

    Result:

    enter image description here