Azure / bicep-types-az

Bicep type definitions for ARM resources
MIT License
86 stars 27 forks source link

SignalR privateEndpoints provided name ignored #2210

Open patelriki13 opened 4 months ago

patelriki13 commented 4 months ago

Describe the bug

I have provided privateEndpoint name as name: 'signalr-name.guid' but it auto generated by azure like resourcename.guid. due to that I provided all rule that is not reflacted to signalr. e.g. allow: [ 'ServerConnection', 'RESTAPI']

resource signalR 'Microsoft.SignalRService/signalR@2024-03-01' = {
  name: name
  location: location
  sku: {
    capacity: 1
    name: 'Standard_S1'
  }
  kind: 'SignalR'
  properties: {    
    features: [
      {
        flag: 'ServiceMode'
        value: 'Serverless'
      }      
    ]
    cors: {
      allowedOrigins: ['*']
    }
    networkACLs: {
      defaultAction: 'Deny'
      publicNetwork: {
        allow: [
          'ClientConnection'
        ]
      }
      privateEndpoints: [
        {
          name: 'signalr-name.guid'
          allow: [
            'ServerConnection'
            'RESTAPI'
          ]
        }
      ]
    }
  }
}

resource privateEndpoint 'Microsoft.Network/privateEndpoints@2020-08-01' = {
  name: endpointName
  location: location
  properties: {
    subnet: {
      id: infrastructureSubnetId
    }
    privateLinkServiceConnections: [
      {
        properties: {
          privateLinkServiceId: resourceId
          groupIds: groupIds
        }
        name: 'pec-${endpointName}'
      }
    ]
  }
}

So you can see after deployed, allow privateendpoint connection is all as I provided only 'ServerConnection' and 'RESTAPI'.

image

Now the que. is this is bug? Please help me in this situaion how to fix it.

patelriki13 commented 4 months ago

Any help from anyone?