applicationgateway setup #3593
-
Hi!! I need advise in writing bicep code for setting up application gateway. Below is the scenario. Overview: What I need help with ?
The problem with the above code is I cannot use this for http listener because http listener don't need a sslCertificate however https listener needs one. So I am not sure how to do this task. Any advise would be greatly helpful |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
You can use the ternary operator to establish the if condition and provide a null where appropriate. sslCertificate: {
id: (contains(httplisteners, 'sslCertificate') ? resourceId('Microsoft.Network/applicationGateways/sslCertificates', appgwname, httplisteners.sslCertificate) : json('null'))
} |
Beta Was this translation helpful? Give feedback.
You can use the ternary operator to establish the if condition and provide a null where appropriate.