Azure / bicep-registry-modules

Bicep registry modules
MIT License
493 stars 346 forks source link

[AVM Module Issue]: #3636

Open jolerasioo opened 2 hours ago

jolerasioo commented 2 hours ago

Check for previous/existing GitHub issues

Issue Type?

Bug

Module Name

avm/res/search/search-service

(Optional) Module Version

0.7.0

Description

I copy-pasted the sample code to try Default and deploying keys to azure key vault with version 0.7.0 and the key vault object parameter is automatically flagged as not permitted. I went into the module and I see it's declare so I don't know exactly where the issue is. I just wanted to raise it for awareness or to be corrected if I missed something.

Image Image

My code:

param location string = resourceGroup().location

param kvName string

param envName string = 'dev'

param aiSeachName string = 'ai-search-${uniqueString(resourceGroup().id)}-${envName}}'

@allowed([
  'free'
  'disabled'
  'standard'
])
@description('Configuration for semantic search, dependent on region and SKU')
param semanticSearchConfig string = 'free'

resource kv 'Microsoft.KeyVault/vaults@2024-04-01-preview' existing ={
  name: kvName
}

module searchService 'br/public:avm/res/search/search-service:0.7.0' = {
  name: 'searchServiceDeployment'
  params: {
    // Required parameters
    name: aiSeachName
    // Non-required parameters
    authOptions: {
      aadOrApiKey: {
        aadAuthFailureMode: 'http401WithBearerChallenge'
      }
    }
    disableLocalAuth: false
    location: location
    semanticSearch: semanticSearchConfig
    // issue gets flagged here
    secretsExportConfiguration: {
      keyVaultResourceId: kv.id
      primaryAdminKeyName: 'Primary-Admin-Key'
      secondaryAdminKeyName: 'Secondary-Admin-Key'
    }
  }
}

(Optional) Correlation Id

No response

microsoft-github-policy-service[bot] commented 2 hours ago

[!IMPORTANT] The "Needs: Triage :mag:" label must be removed once the triage process is complete!

[!TIP] For additional guidance on how to triage this issue/PR, see the BRM Issue Triage documentation.

avm-team-linter[bot] commented 2 hours ago

@jolerasioo, thanks for submitting this issue for the avm/res/search/search-service module!

[!IMPORTANT] A member of the @Azure/avm-res-search-searchservice-module-owners-bicep or @Azure/avm-res-search-searchservice-module-contributors-bicep team will review it soon!