Skip to content

Instantly share code, notes, and snippets.

@astaykov
Last active September 13, 2021 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astaykov/f943e49233f1b49cbe3fd1260bfb8ddd to your computer and use it in GitHub Desktop.
Save astaykov/f943e49233f1b49cbe3fd1260bfb8ddd to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# first disable HTTP and force HTTPS only
az functionapp list --query "[].id" --output tsv | az functionapp update --set httpsOnly=true --ids @-
# then disable FTP in general.
# depending on your process, you might want to enforce FTPS (FtpsOnly) insted of completely disable it (Disabled).
az functionapp list --query "[].id" --output tsv | az functionapp config set --ftps-state Disabled --ids @-
# set client cert operation mode to optional
az functionapp list --query "[].id" --output tsv | az functionapp update --set clientCertMode=optional --ids @-
# enable client cert
az functionapp list --query "[].id" --output tsv | az functionapp update --set clientCertEnabled=true --ids @-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment