Function app App Keys not getting generated

Hello Team,

I am trying to create a function app via terraform using the template i have provided below in the git link. Function app is getting created but the app keys are not loading/generated. The function app is not available for deploying functions to it resulting in

Error: Encountered an error (ServiceUnavailable) from host runtime.

template : GitHub - lijink14/terraform_functionapp: Terraform for creating function app in azure cloud

It would be awesome if someone can help me identify the issue here and resolve it, been stuck here for some time.

Thanks in advance.