-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application Gateway support for Keyvault SSL certificate #3935
Comments
I need exactly the same feature. Powershell has this script below. We need the same implementation extended for tf
|
We use the following as an undocumented workaround:
|
Azure/azure-cli#10119 has just been merged. Can someone with a little more skill than I (@jeffreyCline @mbfrahry @tombuildsstuff etc) look at how difficult it would be to add it as a resource? |
I need this too. I will try to make the necessary updates, although I will need help contributing for the first time. |
h/t to @katbyte for stubbing out most of the |
Although this works it does not automatically poll for certificate renewals when done this way. Looking at ARM the difference below is observed: Above method:
Proper Keyvault integration:
So it seems we need a change to allow the correct parameter to be used, ie. properties block with keyVaultSecretId as a property. Noticed it's been requested already and seems on the 2.0.0 roadmap: #4366 |
I'm very interested in this functionality too. Proper KV integration is important for centralized certificate lifecycle management. If you need a tester, let me know. |
@egorchabala Did you happen to find a way to retrieve the public key required for App Gateway's authentication_certificate? For App Gateway v2, we also need to add the root certificate's public key. If you happen to have a working approach for this I'd love to see it! |
@JohnDelisle what's the need of adding root certificate's public key? For backend SSL encryption? If yes, this is naively supported in Terrafrom resource |
@egorchabala yes, that's correct, if I understand the requirement correctly this is needed for root CA and the certificate on the backend pool too. I've since discovered that because my backend pool certs are issued by a well-known CA that I did not need to include either for App Gw to work.. it was happy without this. If I wasn't using a well-known CA, I imagine I could have put the root CA (and intermediary signing certs') public keys into a Key Vault secret and retrieve that as data. However, in addition to the public key for CA and intermediary certs, I believe in some cases you need to provide the public key of the cert used on their backend pool too. In my case, the backend pool cert is the same as my front-end. What I was wondering with my question above was if there's an easy way (in TF) to derive the public key from the private key that's stored in the KV, rather than needing to maintain both the complete cert and the public key of that cert in KV as two items. I see there are some TF certificate manipulation functions, but I'm not clear as to which if any would work for this situation and produce a public key compatible with App Gw's expectations. |
@JohnDelisle Unfortunately, I'm not aware about this. In general, you either have two different certificates (trusted SSL cert for external publishing and self-signed SSL cert for backend pool) or have no need to specify certificate at all (in case backend SSL use trusted SSL cert) |
This is my first time contributing, so I may have missed something. Implements key vault certificates on HTTPS listener for application gateway. See Issue #3935 According to this Microsoft issue (MicrosoftDocs/azure-docs#34382), the key vault must be set for safe delete mode to work, so I also included that in this PR.
This has been released in version 2.2.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.2.0"
}
# ... other configuration ... |
How can we use this version? I tried to change the version in the provider to " version = "~> 2.2.0"" but it didn't work. |
Hi there, I tried this out and I am able to upload the cert as above. But I keep getting the error message below. Any pointers would be greatly appreciated.
Facts: |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Description
Looking to implement keyvault certificates on HTTPS listener for application gateway. Here are the powershell docs I found on the subject: https://docs.microsoft.com/bs-latn-ba/azure/application-gateway/configure-keyvault-ps
we'd need to update the ssl_certificate section to allow the "ID" of the vault certificate also.
New or Affected Resource(s)
Potential Terraform Configuration
References
related but not a replica:
#3640
The text was updated successfully, but these errors were encountered: