Skip to content

Hooks ordering dilemma for azd up #5806

@vhvb1989

Description

@vhvb1989

For a template using a preprovision hook to automatically feed the azd env for provisioning, azd up result incompatible because azd up starts by compiling infrastructure and ensuring prompting for required parameters before moving to the first step of the workflow.

The default workflow for azd up is: [azd package, azd provision, azd deploy].
Without azd up not starting by compiling and prompting for parameters, users would have to wait until after azd package to see the prompting, which might result unexpected.

But for a template depending on a preprovision hook to automatically load parameters to env, running azd up makes azd prompt to trigger before the preprovision hook.

The only alternative for templates like this is to avoid using azd up and only work with azd provision

Notes:

  • Even defining azd up workflow as [azd provision], azd up would start by compiling/prompting as part of the bootstrap before calling any hooks.

Template example: https://github.com/AzureCosmosDB/fabric-keyvault-openai-secrets/blob/main/azure.yaml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions