mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-25 02:41:03 +01:00
Add EKS Secret envelope encryption support (#772)
This adds support for configuring EKS clusters that utilise envelope encryption for Secrets: - https://aws.amazon.com/about-aws/whats-new/2020/03/amazon-eks-adds-envelope-encryption-for-secrets-with-aws-kms/ - https://aws.amazon.com/blogs/containers/using-eks-encryption-provider-support-for-defense-in-depth/
This commit is contained in:
11
cluster.tf
11
cluster.tf
@@ -27,6 +27,17 @@ resource "aws_eks_cluster" "this" {
|
||||
delete = var.cluster_delete_timeout
|
||||
}
|
||||
|
||||
dynamic encryption_config {
|
||||
for_each = toset(var.cluster_encryption_config)
|
||||
|
||||
content {
|
||||
provider {
|
||||
key_arn = encryption_config.value["provider_key_arn"]
|
||||
}
|
||||
resources = encryption_config.value["resources"]
|
||||
}
|
||||
}
|
||||
|
||||
depends_on = [
|
||||
aws_iam_role_policy_attachment.cluster_AmazonEKSClusterPolicy,
|
||||
aws_iam_role_policy_attachment.cluster_AmazonEKSServicePolicy,
|
||||
|
||||
Reference in New Issue
Block a user