azure-dev
azure-dev copied to clipboard
[Issue] host: aks fails on postprovision hook if iac doesn't include aks
I have a two phase provision:
phase 1
- provision openai
- run the app locally
phase 2:
- provision the rest of the services, including aks
when host is aks, azd will do an auto-post-provision hook to do aks deployments or config.
Since phase 1 doesn't have aks provisioned, then this will fail with:
ERROR: deployment failed: failed invoking event handlers for 'postprovision', failed retrieving cluster admin credentials. Ensure your cluster has been configured to support admin credentials, parameter resourceName cannot be empty
I would like the post-provision hook to fail gracefully if the aks resources don't exist.