[Issue] Azdup --no-prompt not work for Azure-Samples/azure-search-openai-demo
Repo: https://github.com/Azure-Samples/azure-search-openai-demo
Maybe need a good guideline here. The question is for above repo. When I run azd up --no-prompt it will fail as:
ERROR: initializing provisioning manager: prompting for value: prompting for location: '' is not an allowed choice. allowed choices: 1. (Europe) West Europe (westeurope), 2. (US) East US (eastus), 3. (US) West US 2 (westus2)
Maybe since the parameter does not have default value and need people input during provision. (Not sure the root cause). In bicep https://github.com/Azure-Samples/azure-search-openai-demo/blob/a1fe90090e4e2e60cbd3fd73630f55c55ac2a3b9/infra/main.bicep#L81:
@description('Location for the OpenAI resource group')
@allowed([ 'canadaeast', 'eastus', 'eastus2', 'francecentral', 'switzerlandnorth', 'uksouth', 'japaneast', 'northcentralus', 'australiaeast', 'swedencentral' ])
@metadata({
azd: {
type: 'location'
}
})
param openAiResourceGroupLocation string
@description('Location for the Document Intelligence resource group')
@allowed([ 'eastus', 'westus2', 'westeurope' ])
@metadata({
azd: {
type: 'location'
}
})
param documentIntelligenceResourceGroupLocation string
If run azd up locally:
Since the we want to run azd up in pipeline. So we add --no-prompt but it seems that not work here.
My question:
- Without changing the bicep, and solution to run real without manually input? means real --no-prompt? I know that maybe add environment variable in azd env maybe a solution. But assuming that we cannot know the which parameters needed before running azd up, since we will not read the bicep before it.
- If we can change the bicep, any suggestion? E.g. add some default value? but still let customer select during azd up?
The way --no-prompt works:
--no-prompt : Accepts the default value instead of prompting, or it fails if there is no default.
Indeed, since no default value was provided, the prompt failed.
Without changing the bicep, and solution to run real without manually input?
For configuring CI/CD, if you run azd pipeline config, the pipeline config command would prompt the user to provide the value. The value for these parameter are saved via AZD_INITIAL_ENVIRONMENT_CONFIG, so there isn't a need to set anything past that.
Hi @LianwMS. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.
Hi @LianwMS, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.