Azure resource manager bicep files not in code overview

I have been trying to get the infrastucture as code analyzed by sonar cloud. As i understood just making sure the checkbox under Azure resource manager should be enough to get the files analyzed. However only the .yml files are shown in the code section of sonarcloud and not the bicep files. What could i be missing here?

Hey there.

Could you provide an example Bicep file that you can reproduce this issue with?

Hi Colin.
Thank you for your response.
I dont think the problem is within the bicep files we have allot of bicep files in the solution non of which show up in sonar cloud analyses
But all are successfully used in the provisioning of azure

And there could still be something specific about these files that would make it useful to have a reproducer!

hmm ok an example file could be like this. I did replace some info with xxx for security reasons

@description('The name of the front door resource')
param frontDoorName string

@description('The base name for the route-specific resources')
param prefix string

@description('The name of the endpoint to be used')
param endpoint string

@description('The front-end domain')
param domainName string

@description('The HTTPS secret name')
param httpsSecretName string

@description('The origin domain name')
param originDomain string

@description('The health check endpoint')
param healthCheckEndpoint string = '/status'

@description('The interval for health checks')
param healthProbeInterval int = 240

resource frontDoorProfile 'xxx' existing = {
  name: frontDoorName

resource httpsSecret 'xxx' existing = {
  parent: frontDoorProfile
  name: httpsSecretName

resource frontDoorEndpoint 'xxx' = {
  name: endpoint
  parent: frontDoorProfile
  location: 'global'
  properties: {
    enabledState: 'Enabled'

resource frontDoorOriginGroup 'xxx' = {
  name: '${prefix}-group'
  parent: frontDoorProfile
  properties: {
    loadBalancingSettings: {
      sampleSize: 4
      successfulSamplesRequired: 3
    healthProbeSettings: {
      probePath: healthCheckEndpoint
      probeRequestType: 'GET'
      probeProtocol: 'Https'
      probeIntervalInSeconds: healthProbeInterval

resource frontDoorOrigin 'xxx' = {
  name: '${prefix}-origin'
  parent: frontDoorOriginGroup
  properties: {
    hostName: originDomain
    httpPort: 80
    httpsPort: 443
    originHostHeader: originDomain
    priority: 1
    weight: 1000

resource customDomain 'xxx' = {
  name: '${prefix}-domain'
  parent: frontDoorProfile
  properties: {
    hostName: domainName
    tlsSettings: {
      certificateType: 'CustomerCertificate'
      secret: {id:}
      minimumTlsVersion: 'TLS12'

resource frontDoorRoute 'xxx' = {
  name: '${prefix}-route'
  parent: frontDoorEndpoint
  dependsOn: [frontDoorOrigin]
  properties: {
    originGroup: {
    supportedProtocols: ['Http','Https']
    httpsRedirect: 'Enabled'
    patternsToMatch: ['/*']
    forwardingProtocol: 'HttpsOnly'
    linkToDefaultDomain: 'Disabled'
    customDomains: [{}]

@description('The resource id of the created front door endpoint')
output endpointId string =

@description('The resource id of the custom domain')
output domainId string =

Hi @Robin1,

welcome to the community. Are you trying to analyze the project via AutoScan? We still have an issue with picking .bicep files with AutoScan. If it is possible for you please try to set up and test a CI-based analysis.


Hi Nils,

I was hop;ing to use the AutoScan indeed. Could you share an example pipeline where it is set up with CI-based analysis?

Hey @Robin1

If you go into your project’s Administration > Analysis Method, you should find tutorials for all the relevant CIs.

we are using CI based but the bicep files still dont show in the project. our pipeline looks like this:

- task: SonarCloudPrepare@1
              SonarCloud: 'SonarCloud'
              organization: 'org'
              scannerMode: 'CLI'
              configMode: 'manual'
              cliProjectKey: 'key'
              cliProjectName: 'name'
              cliSources: 'azure'
              extraProperties: |

          - task: SonarCloudAnalyze@1
              jdkversion: 'JAVA_HOME_17_X64'
          - task: SonarCloudPublish@1
              pollingTimeoutSec: '300'

Should it be working like this or am i still missing something?

Hey @Robin1

There’s a bunch of background work going on and I’m sorry it’s not very transparent – a fix should be coming.

Hello @Robin1 ,

Could you try the analysis again? The problem with picking up .bicep files should be solved now.