@@ -17,7 +17,7 @@ data "aws_iam_policy_document" "cert_manager" {
1717
1818 statement {
1919 actions = [" route53:GetChange" ]
20- resources = [" arn:aws :route53:::change/*" ]
20+ resources = [" arn:${ local . partition } :route53:::change/*" ]
2121 }
2222
2323 statement {
@@ -550,9 +550,9 @@ data "aws_iam_policy_document" "karpenter_controller" {
550550 statement {
551551 actions = [" ec2:RunInstances" ]
552552 resources = [
553- " arn:aws :ec2:*:${ local . account_id } :launch-template/*" ,
554- " arn:aws :ec2:*:${ local . account_id } :security-group/*" ,
555- " arn:aws :ec2:*:${ local . account_id } :subnet/*" ,
553+ " arn:${ local . partition } :ec2:*:${ local . account_id } :launch-template/*" ,
554+ " arn:${ local . partition } :ec2:*:${ local . account_id } :security-group/*" ,
555+ " arn:${ local . partition } :ec2:*:${ local . account_id } :subnet/*" ,
556556 ]
557557
558558 condition {
@@ -565,10 +565,10 @@ data "aws_iam_policy_document" "karpenter_controller" {
565565 statement {
566566 actions = [" ec2:RunInstances" ]
567567 resources = [
568- " arn:aws :ec2:*::image/*" ,
569- " arn:aws :ec2:*:${ local . account_id } :instance/*" ,
570- " arn:aws :ec2:*:${ local . account_id } :volume/*" ,
571- " arn:aws :ec2:*:${ local . account_id } :network-interface/*" ,
568+ " arn:${ local . partition } :ec2:*::image/*" ,
569+ " arn:${ local . partition } :ec2:*:${ local . account_id } :instance/*" ,
570+ " arn:${ local . partition } :ec2:*:${ local . account_id } :volume/*" ,
571+ " arn:${ local . partition } :ec2:*:${ local . account_id } :network-interface/*" ,
572572 ]
573573 }
574574
@@ -1144,7 +1144,7 @@ resource "aws_iam_role_policy_attachment" "node_termination_handler" {
11441144data "aws_iam_policy_document" "vpc_cni" {
11451145 count = var. create_role && var. attach_vpc_cni_policy ? 1 : 0
11461146
1147- # arn:aws :iam::aws:policy/AmazonEKS_CNI_Policy
1147+ # arn:${local.partition} :iam::aws:policy/AmazonEKS_CNI_Policy
11481148 dynamic "statement" {
11491149 for_each = var. vpc_cni_enable_ipv4 ? [1 ] : []
11501150 content {
0 commit comments