Guided Prompting #3120
Replies: 4 comments 4 replies
-
Hi @shaneholder , did you take a look at the option of using This should allow you in a scipted and interactive approach to query the parameters and then use them in azd. |
Beta Was this translation helpful? Give feedback.
-
Hi. Christian,
No I had not considered that. I did look at the hooks and see their value
but did not think of them as a solution to this problem. I will re
evaluate that and see what I can put together. However just at first
thought it seems like a feature that should be more built into the
product. Building a navigable and searchable list of choices with names
and values could end up being more complicated than necessary but it is an
interesting option.
Thanks for the idea.
Regards,
Shane
…On Thu, Dec 14, 2023, 10:41 AM Christian Lechner ***@***.***> wrote:
Hi @shaneholder <https://github.com/shaneholder> , did you take a look at
the option of using hooks to implement this requirement? You find the
official documentation here:
https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/azd-extensibility
.
This should allow you in a scipted and interactive approach to query the
parameters and then use them in azd.
—
Reply to this email directly, view it on GitHub
<#3120 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA42K6S3Y2Q3CTA45EHJCDYJMT2BAVCNFSM6AAAAABAU77Z6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TQNJVGU3DC>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@shaneholder , if use set an input parameter without a default value, azd will prompt the user to enter a value for it. See this example: https://github.com/Azure-Samples/azure-search-openai-demo/blob/6cc78369938e463085ae777bc83a82adc27e40fe/infra/main.bicep#L54 @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 The parameter azd supports the If the azd/type metadata is not provided, azd will just use a free-input-text as input. Can you describe how, in your use-case, a user would choose a |
Beta Was this translation helpful? Give feedback.
-
That is interesting as well, does that work for terraform?
Thanks,
Shane
…On Thu, Dec 14, 2023, 5:20 PM Victor Vazquez ***@***.***> wrote:
@shaneholder <https://github.com/shaneholder> , if use set an input
parameter without a default value, azd will prompt the user to enter a
value for it.
See this example:
https://github.com/Azure-Samples/azure-search-openai-demo/blob/6cc78369938e463085ae777bc83a82adc27e40fe/infra/main.bicep#L54
@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
The parameter openAiResourceGroupLocation has no default value, so azd
will automatically display a prompt before provisioning the infrastructure,
asking for the value.
azd supports the azd/type object as part of the parameter metadata to
make azd to use an specific prompt type. The only supported type until now
is location, which would show the user a list of locations interactively.
If the azd/type metadata is not provided, azd will just use a
free-input-text as input.
Can you describe how, in your use-case, a user would choose a vnet/subnet
?
Would the user already know the name to use? or do the user need to pull
the valid names from somewhere?
Based on your feedback, we could create a feature-request to support a
unique prompt, similar to the location prompt, where you can set the
valid vnet/subnet
—
Reply to this email directly, view it on GitHub
<#3120 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA42K3VYIZ35J4QMP3I5TTYJOCUPAVCNFSM6AAAAABAU77Z6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TQNJYGY4DQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello, I've been working on a similar project that is internal to my company using yeoman but considering switching our templates to use azd instead. Our current system will prompt users for some additional Azure resources like vnets and keyvaults. We build out workloads using the CAF vending machine concept and the initial subscription layout will create a few resources that we consider necessary for all projects including a couple of vnets, one peered to a corporate vwan. I would like to be able to prompt a user for the vnet/subnet that a resource should be placed into, is that possible or on the roadmap?
Beta Was this translation helpful? Give feedback.
All reactions