File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed
modules/iam-role-for-service-accounts-eks Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,7 @@ No modules.
170170| [ aws_iam_policy_document.velero] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document ) | data source |
171171| [ aws_iam_policy_document.vpc_cni] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document ) | data source |
172172| [ 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 |
173174
174175## Inputs
175176
Original file line number Diff line number Diff line change 11data "aws_partition" "current" {}
22data "aws_caller_identity" "current" {}
3+ data "aws_region" "current" {}
34
45locals {
56 account_id = data. aws_caller_identity . current . account_id
67 partition = data. aws_partition . current . partition
78 dns_suffix = data. aws_partition . current . dns_suffix
9+ region = data. aws_region . current . name
810 role_name_condition = var. role_name != null ? var. role_name : " ${ var . role_name_prefix } *"
911}
1012
Original file line number Diff line number Diff line change @@ -599,6 +599,11 @@ data "aws_iam_policy_document" "karpenter_controller" {
599599 resources = var. karpenter_controller_node_iam_role_arns
600600 }
601601
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+
602607 dynamic "statement" {
603608 for_each = var. karpenter_sqs_queue_arn != null ? [1 ] : []
604609
You can’t perform that action at this time.
0 commit comments