Skip to content

feat: add support for external Key Vault certificate#25

Draft
nhoelterhoff wants to merge 2 commits into
langfuse:mainfrom
nhoelterhoff:feat/external-keyvault-certificate
Draft

feat: add support for external Key Vault certificate#25
nhoelterhoff wants to merge 2 commits into
langfuse:mainfrom
nhoelterhoff:feat/external-keyvault-certificate

Conversation

@nhoelterhoff

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for using an external Azure Key Vault certificate instead of the self-signed certificate created by the module. This allows users to bring their own SSL certificates from their own Key Vault.

  • Added ssl_certificate_secret_id variable to accept external certificate secret ID
  • Made self-signed certificate creation conditional based on the variable
  • Updated Application Gateway to use external or internal certificate via local variable
  • Maintains full backward compatibility (defaults to self-signed certificate if not provided)

Use Case

Users can now pass their own certificate from an external Key Vault:

module "langfuse" {
  source = "..."
  ssl_certificate_secret_id = "https://my-keyvault.vault.azure.net/secrets/my-cert"
  # ... other variables
}

The Application Gateway managed identity must have appropriate access permissions to the external Key Vault (assumes it's already whitelisted).

Testing

  • ✅ Code formatted with terraform fmt
  • ✅ Backward compatible - existing deployments will continue to work without changes
  • ✅ When ssl_certificate_secret_id is provided, module uses external certificate
  • ✅ When ssl_certificate_secret_id is null (default), module creates self-signed certificate

🤖 Generated with Claude Code

nhoelterhoff and others added 2 commits October 6, 2025 13:52
This change allows users to bring their own SSL certificate from an external Azure Key Vault instead of relying on the self-signed certificate created by the module.

Changes:
- Add `ssl_certificate_secret_id` variable to accept external certificate secret ID
- Make self-signed certificate creation conditional based on variable
- Update Application Gateway to use external or internal certificate via local
- Maintain backward compatibility (defaults to self-signed if not provided)

Users can now pass their own certificate from an external Key Vault:
```hcl
module "langfuse" {
  source = "..."
  ssl_certificate_secret_id = "https://my-keyvault.vault.azure.net/secrets/my-cert"
  # ... other variables
}
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@nhoelterhoff nhoelterhoff marked this pull request as draft October 6, 2025 11:53
@Steffen911 Steffen911 self-requested a review October 10, 2025 07:56
@wi5nia

wi5nia commented Jan 26, 2026

Copy link
Copy Markdown

When we can have in the main module @Steffen911 because it has been here for a long time. I did also my own implementation for now but it would be great to finally have it officially.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants