You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description="Default Service-Linked Role enables access to AWS Services and Resources used or managed by Auto Scaling"
5
5
}
6
6
7
7
data"aws_caller_identity""current" {}
8
8
9
-
// This policy is required for the KMS key used for EKS root volumes, so the cluster is allowed to enc/dec/attach encrypted EBS volumes
9
+
# This policy is required for the KMS key used for EKS root volumes, so the cluster is allowed to enc/dec/attach encrypted EBS volumes
10
10
data"aws_iam_policy_document""ebs_decryption" {
11
-
// copy of default KMS policy that lets you manage it
11
+
# Copy of default KMS policy that lets you manage it
12
12
statement {
13
13
sid="Enable IAM User Permissions"
14
14
effect="Allow"
@@ -25,16 +25,16 @@ data "aws_iam_policy_document" "ebs_decryption" {
25
25
resources=["*"]
26
26
}
27
27
28
-
// required for EKS
28
+
# Required for EKS
29
29
statement {
30
30
sid="Allow service-linked role use of the CMK"
31
31
effect="Allow"
32
32
33
33
principals {
34
34
type="AWS"
35
35
identifiers=[
36
-
"arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling", // required for the ASG to manage encrypted volumes for nodes
37
-
module.eks.cluster_iam_role_arn, // required for the cluster / persistentvolume-controller to create encrypted PVCs
36
+
"arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling", # required for the ASG to manage encrypted volumes for nodes
37
+
module.eks.cluster_iam_role_arn, # required for the cluster / persistentvolume-controller to create encrypted PVCs
38
38
]
39
39
}
40
40
@@ -56,8 +56,8 @@ data "aws_iam_policy_document" "ebs_decryption" {
56
56
principals {
57
57
type="AWS"
58
58
identifiers=[
59
-
"arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling", // required for the ASG to manage encrypted volumes for nodes
60
-
module.eks.cluster_iam_role_arn, // required for the cluster / persistentvolume-controller to create encrypted PVCs
59
+
"arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling", # required for the ASG to manage encrypted volumes for nodes
60
+
module.eks.cluster_iam_role_arn, # required for the cluster / persistentvolume-controller to create encrypted PVCs
//image_id = var.ami_id // if you want to use a custom AMI
52
+
# if you want to use a custom AMI
53
+
# image_id = var.ami_id
52
54
53
-
// if you use a custom AMI, you need to supply via user-data, the bootstrap script as EKS DOESNT merge its managed user-data then
54
-
// you can add more than the minimum code you see in the template, e.g. install SSM agent, see https://github.com/aws/containers-roadmap/issues/593#issuecomment-577181345
55
-
//
56
-
// (optionally you can use https://registry.terraform.io/providers/hashicorp/cloudinit/latest/docs/data-sources/cloudinit_config to render the script, example: https://github.com/terraform-aws-modules/terraform-aws-eks/pull/997#issuecomment-705286151)
55
+
# If you use a custom AMI, you need to supply via user-data, the bootstrap script as EKS DOESNT merge its managed user-data then
56
+
# you can add more than the minimum code you see in the template, e.g. install SSM agent, see https://github.com/aws/containers-roadmap/issues/593#issuecomment-577181345
57
+
#
58
+
# (optionally you can use https://registry.terraform.io/providers/hashicorp/cloudinit/latest/docs/data-sources/cloudinit_config to render the script, example: https://github.com/terraform-aws-modules/terraform-aws-eks/pull/997#issuecomment-705286151)
// supplying custom tags to EKS instances root volumes is another use-case for LaunchTemplates. (doesnt add tags to dynamically provisioned volumes via PVC tho)
74
+
# Supplying custom tags to EKS instances root volumes is another use-case for LaunchTemplates. (doesnt add tags to dynamically provisioned volumes via PVC tho)
0 commit comments