Need advice: setting up or customizing programmatic Azure service provisioning with .bicep file #197
-
|
Hello, We are a small team from Sweden that builds parts of our solution from this repo https://github.com/Azure-Samples/azure-search-openai-demo. We are looking for guidance on customizing We are wondering if we can get some suggestion on the what would be the best practice here, whether to edit main.bicep directly, or is there any other way to programmatically produce this file? another way we can think about right now is to customize environment variables in We’re new to Azure infra, so tips, patterns, or docs are appreciated. Thanks! 😁 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Hey @alfredrafles, thanks for the question. I'm thinking @farzad528 and/or @jfomhover might be best to respond here or may know someone who might |
Beta Was this translation helpful? Give feedback.
-
|
@pamelafox can you assist here? |
Beta Was this translation helpful? Give feedback.
-
|
@alfredrafles You can either completely delete the components, or you can use the conditional parameter approach. Add a new parameter like USE_FEATURE_X in main.parameters.json, similar to USE_MULTIMODAL: Then in main.bicep, add a parameter useFeatureX, and use that with if conditions to conditionally bring in what you want. See useMultimodal for an example. Bicep can be a bit tricky as sometimes you also need to use conditionals INSIDE the already conditional modules, due to how it evaluates properties. Then run "azd env set USE_FEATURE_X false" before running "azd up" or "azd provision". I put some of this info in AGENTS.MD so hopefully coding agents can also help a bit with this, as many developers do add additional azd env variables for provisioning. |
Beta Was this translation helpful? Give feedback.
@alfredrafles You can either completely delete the components, or you can use the conditional parameter approach.
Add a new parameter like USE_FEATURE_X in main.parameters.json, similar to USE_MULTIMODAL:
https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/infra/main.parameters.json#L206
Then in main.bicep, add a parameter useFeatureX, and use that with if conditions to conditionally bring in what you want. See useMultimodal for an example.
Bicep can be a bit tricky as sometimes you also need to use conditionals INSIDE the already conditional modules, due to how it evaluates properties.
Then run "azd env set USE_FEATURE_X false" before running "azd up" or "azd provision".
I…