skip to Main Content

Trying to build an Azure Application Gateway using the following instructions and cannot get it to build without an exception stating that the certificate referenced by the listener cannot be found

https://learn.microsoft.com/en-us/azure/application-gateway/tutorial-ssl-powershell

Can anyone get this to work?

I have tried following the instructions verbatim and it will not work. I can build an Application Gateway without SSL, but not with SSL as described in Microsoft’s TLS Termination How-To guide.

2

Answers


  1. Chosen as BEST ANSWER

    @DusDee had the best advice on debugging this! This is now working and integrated with the rest of my scripts. Check the certificate data and make sure it's valid.


  2. The error experienced was because when running New-AzApplicationGatewaySslCertificate, this command can fail for a few reasons:

    • Incorrect PFX password
    • Invalid certificate data

    If you assigned this to a variable called $sslCert, trying to evaluate its value when the command fails will return an empty result which is both ‘falsey’ and not a PSApplicationGatewaySslCertificate object which is what the New-AzApplicationGatewayHttpListener command requires when configuring an HTTPS listener.

    This causes the deployment to fail because the listener is referencing a non-existant certificate since it was passed as an empty variable.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search