File tree 3 files changed +8
-0
lines changed
modules/iam-role-for-service-accounts-eks
3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,7 @@ No modules.
170
170
| [ aws_iam_policy_document.velero] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document ) | data source |
171
171
| [ aws_iam_policy_document.vpc_cni] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document ) | data source |
172
172
| [ aws_partition.current] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/partition ) | data source |
173
+ | [ aws_region.current] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region ) | data source |
173
174
174
175
## Inputs
175
176
Original file line number Diff line number Diff line change 1
1
data "aws_partition" "current" {}
2
2
data "aws_caller_identity" "current" {}
3
+ data "aws_region" "current" {}
3
4
4
5
locals {
5
6
account_id = data. aws_caller_identity . current . account_id
6
7
partition = data. aws_partition . current . partition
7
8
dns_suffix = data. aws_partition . current . dns_suffix
9
+ region = data. aws_region . current . name
8
10
role_name_condition = var. role_name != null ? var. role_name : " ${ var . role_name_prefix } *"
9
11
}
10
12
Original file line number Diff line number Diff line change @@ -599,6 +599,11 @@ data "aws_iam_policy_document" "karpenter_controller" {
599
599
resources = var. karpenter_controller_node_iam_role_arns
600
600
}
601
601
602
+ statement {
603
+ actions = [" eks:DescribeCluster" ]
604
+ resources = [" arn:${ local . partition } :eks:${ local . region } :${ local . account_id } :cluster/${ var . karpenter_controller_cluster_id } " ]
605
+ }
606
+
602
607
dynamic "statement" {
603
608
for_each = var. karpenter_sqs_queue_arn != null ? [1 ] : []
604
609
You can’t perform that action at this time.
0 commit comments