Connect to your Azure CLI or You can Open Azure CLI from the Azure portal as well.
Create Storage Account:
az storage account create --name --location --resource-group --sku Standard_LRS
Ex:-
az storage account create --name apistorage --location westindia --resource-group apiGroup --sku Standard_LRS
Create Resource Group:
az group create --name --location
Ex:-
az group create --name apiGroup --location westindia
Now you can create your azure function from CLI:
Ex:-
az functionapp create --resource-group apiGroup --os-type Linux --consumption-plan-location westindia --runtime python --name ServiceName --storage-account apistorage
Reference:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-python