-
Notifications
You must be signed in to change notification settings - Fork 18
feat(kms): add Key Vault KMS encryption support for AKS clusters #945
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds Key Management Service (KMS) support for AKS clusters using Azure Key Vault encryption. The implementation enables users to configure a Key Vault with encryption keys and selectively enable KMS on individual AKS clusters for etcd encryption.
Key Changes:
- New
key_vault_kms_configvariable to define Key Vault and encryption keys - Per-cluster KMS enablement via
kms_key_nameparameter in AKS configurations - User-assigned identity creation and RBAC role assignments for KMS-enabled clusters
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/terraform/azure/variables.tf | Added key_vault_kms_config variable with validation, and kms_key_name/key_vault_network_access parameters to AKS configs |
| modules/terraform/azure/main.tf | Integrated key_vault module, updated provider with Key Vault features, passed KMS config to AKS/AKS-CLI modules |
| modules/terraform/azure/key-vault/versions.tf | New module: defined Terraform and azurerm provider version requirements |
| modules/terraform/azure/key-vault/variables.tf | New module: defined variables for Key Vault configuration with validation |
| modules/terraform/azure/key-vault/outputs.tf | New module: exposed Key Vault ID and key mappings for use by AKS modules |
| modules/terraform/azure/key-vault/main.tf | New module: implemented Key Vault creation, key generation, and RBAC role assignments |
| modules/terraform/azure/aks/variables.tf | Added key_management_service variable with Key Vault configuration object |
| modules/terraform/azure/aks/main.tf | Added user-assigned identity creation, KMS configuration block, and Key Vault role assignments |
| modules/terraform/azure/aks-cli/variables.tf | Added key_management_service variable for CLI-based AKS clusters |
| modules/terraform/azure/aks-cli/main.tf | Added KMS parameters to CLI command and Key Vault role assignments (has critical bug) |
| modules/terraform/azure/tests/test_aks_aad.tftest.hcl | Changed test commands from plan to apply (unnecessary and inconsistent with repo patterns) |
- Add key_vault_kms_config variable to define Key Vault with multiple encryption keys - Support explicit key selection per AKS cluster via kms_key_name parameter# Please enter the commit message for your changes. Lines starting
e4f5ad8 to
7766b51
Compare
This reverts commit 7766b51.
… include KMS configuration details.
This reverts commit db77007.
e6342b7 to
7ecc85b
Compare
This commit introduces KMS support for AKS cluster creation, including:
When KMS is enabled for an AKS cluster, use a user-assigned identity and grant: