Upon frequent trial and error, I just realized that the issue is the --dapr-app-port value I have placed. Initially I thought this was the dapr port but upon reading the help (az containerapp create --help) it refers to the port of the app. So when I have set it to 80, it is now working as expected.
Azure Container Apps fails to provision often if dapr is enabled
I have been trying out the Azure Container Apps with Dapr. I know it is in Preview but would be great if this is sorted out so that when it is available publicly we know it does work. So what happen is that every time I create a Container App with Dapr enabled, the Provision Status will be in Failed status in the revision. Sometimes, when I just spin up another revision with no changes into it, it get Provisioned. It is inconsistent though on what is really going on.
Here are the different commands I have been doing which creates the container apps but normally fails in the provisioning part:
az containerapp create `
--name front `
--resource-group $RESOURCE_GROUP `
--environment $CONTAINERAPPS_ENVIRONMENT `
--image docker.io/uyandrew/container-app-front:latest `
--target-port 80 `
--ingress 'external' `
--min-replicas 1 `
--max-replicas 1 `
--enable-dapr `
--dapr-app-port 3002 `
--dapr-app-id front
az containerapp create `
--name front `
--resource-group $RESOURCE_GROUP `
--environment $CONTAINERAPPS_ENVIRONMENT `
--image docker.io/uyandrew/container-app-front:latest `
--target-port 80 `
--ingress 'external' `
--min-replicas 1 `
--max-replicas 1 `
--enable-dapr `
--dapr-app-port 3002 `
--dapr-app-id front `
--secrets "storage-account-name=${STORAGE_ACCOUNT},storage-account-key=${STORAGE_ACCOUNT_KEY}" `
--dapr-components ./components.yaml
Initially I though that it was to do with dapr-app-id, dapr-app-port, or even the dapr-components but with the one I have created where it failed and then it succeeded after the second revision and failed in the third revision which all those revisions are just creating new revision with no changes, it make me think that there might be something with provisioning those container app with dapr that is causing the problem.