Building on the answer from @mr3k I was able to us the AzureFunctionApp@2 task to deploy out my flex consumption function app but initially got the "Failed to deploy web package to App Service. Not Found (CODE: 404)" error @Crwydryn had mentioned. To resolve this I needed to make two changes:
See https://github.com/Azure-Samples/azure-functions-flex-consumption-samples/blob/main/IaC/bicep/main.bicep for an example of how to setup the storage account blob container for the deployment