-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Correctly set computer vision location #1045
Conversation
- This was causing the deployment to fail when advanced image processing was enabled as it overrides the default location in the `main.bicep` to '' - Tried adding the same logic to the `main.bicepparam` file but it clashes with the validation in the `main.bicep`
Would this work? @description('Location of Computer Vision Resource (if useAdvancedImageProcessing=true)')
@allowed([
// List taken from https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/image-retrieval?tabs=python#prerequisites
'eastus'
'westus'
'koreacentral'
'francecentral'
'northeurope'
'westeurope'
'southeastasia'
''
])
param computerVisionLocation string = ''
...
module computerVision 'core/ai/cognitiveservices.bicep' = if (useAdvancedImageProcessing) {
name: 'computerVision'
scope: rg
params: {
name: computerVisionName
kind: 'ComputerVision'
location: computerVisionLocation != '' ? computerVisionLocation : location
tags: tags
sku: {
name: computerVisionSkuName
}
}
} |
@cecheta Great suggestion! That appears to work perfectly. Might be worth turning off whitespace in the review tab as it looks like my IDE auto formatted the files |
Pre-commit should be formatting the files, but looks like you're using an old version of bicep |
🎉 This PR is included in version 1.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
was enabled as it overrides the default location in the
main.bicep
to
""