Feature: Terraform Moudle for Azure Key Vault and IAM Integration with AKS Workloads #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Terraform Module for Azure Key Vault and IAM Integration with AKS Workloads
Addresses #21
Description:
This PR introduces a new Terraform module that provisions an Azure Key Vault along with IAM identities, enabling AKS workloads to securely access secrets stored in the Key Vault. The module ensures that each application deployed on an AKS cluster can be integrated with its own isolated Key Vault, enhancing security and separation of concerns.
Module Usage:
Parameters:
aks_config
: Configuration specific to the AKS cluster, including the namespace, OIDC issuer URL, and service account name.app_name
: The name of the application, used for naming resources consistently.environment
: The environment (e.g., sandbox, staging, production) where the application is deployed.resource_group_name
: The Azure Resource Group where the resources will be created.Key Features:
Azure Key Vault Provisioning:
Creates a dedicated Key Vault for each application, ensuring secrets are stored securely and access is restricted.
IAM Integration:
Configures IAM identities and permissions so that AKS workloads can authenticate with the Key Vault using Kubernetes service accounts and Azure AD identities.
Extensible Design:
The module is structured to allow for the future addition of other application-specific resources, such as:
Outputs:
The module provides outputs (
key_vault_name
,workload_id
, andtenant_id
) that will be used in the respective application Helm charts, enabling seamless integration with the provisioned Azure resources.Justification:
This approach provides several benefits:
Security Isolation:
Each application has its own Key Vault, ensuring that secrets are managed centrally with access control granted for individual KeyVaults as required
Synchronization:
AKS pods are always synced with Key Vault contents, obviating the need to run CD pipelines whenever secret values need to be added or adjusted
Consistency and Scalability:
Standardizes the way resources are provisioned for applications on AKS, making it easier to scale and manage different application deployments across various environments.
Future-Proof Design:
The module's structure allows for easy extension to include additional resources, supporting evolving application needs without significant refactoring.
Simplified Deployment:
Outputs are tailored for easy consumption in Helm charts, reducing the complexity of managing secrets and identity configurations within Kubernetes.
Next Steps:
This PR ensures that AKS workloads can securely access Azure Key Vaults while laying the foundation for consistent and extensible application infrastructure management.