Closed kgundraju closed 2 years ago
Is this a warning or an error? If it is a warning, have you tried deploying the code and did it deploy successfully?
It's possible the type definition for this resource type is not complete/accurate, but that should be non-blocking.
This particular setting should come from NIC, below scripts works fine.
resource networkSecurityGroupResource 'Microsoft.Network/networkSecurityGroups@2020-11-01' existing = { name: networkSecurityGroupName }
resource virtualNetworkResource 'Microsoft.Network/virtualNetworks@2020-11-01' existing = { name: sonarVirtualNetworkName }
resource publicIPAddressResource 'Microsoft.Network/publicIPAddresses@2020-11-01' existing = { name: publicIPAddressName } var appGwId = resourceId('Microsoft.Network/applicationGateways', appGatewayName)
resource networkInterfaceResource 'Microsoft.Network/networkInterfaces@2020-11-01' = {
name: networkInterfaceName
location: location
tags: {
Environment: environment
sonarqube: tags
}
properties: {
ipConfigurations: [
{
name: 'ipconfig1'
properties: {
privateIPAllocationMethod: 'Dynamic'
publicIPAddress: {
id: publicIPAddressResource.id
}
subnet: {
id: '${virtualNetworkResource.id}/subnets/${subnetName}'
}
applicationGatewayBackendAddressPools: [
{
id: '${appGwId}/backendAddressPools/backendpool'
}
]
primary: true
privateIPAddressVersion: 'IPv4'
}
}
]
enableAcceleratedNetworking: false
enableIPForwarding: false
networkSecurityGroup: {
id: networkSecurityGroupResource.id
}
}
}
Bicep version v0.4.1318 Describe the bug We are unable to add Virtual machine as backendpool to the Application gateway through bicep IaC.
In Microsoft document we could see that there are only two placeholders for IPAddress and FQDN but the requirement is to add virtual machine as backendpool. Options available in portal:![image](https://user-images.githubusercontent.com/95614131/161280855-c04cb77c-94fd-4beb-9370-6d72b1154141.png)
Options available in Bicep template: https://docs.microsoft.com/en-us/azure/templates/microsoft.network/applicationgateways?tabs=bicep
To Reproduce The below code is inspiration from https://github.com/Azure/azure-rest-api-specs/issues/7475
this code is giving below error.
Error:
Additional context We are stuck here and there is no proper documentation is available on the same.