Skip to content

Commit

Permalink
fix: Allow for both amazonaws.com.cn and amazonaws.com conditions…
Browse files Browse the repository at this point in the history
… in PassRole as required for AWS CN (#3422)

* Allow for both amazonaws.com.cn and amazonaws.com conditions as required for AWS CN

* Allow for both amazonaws.com.cn and amazonaws.com conditions as required for AWS CN - set in correct policy

---------

Co-authored-by: Oliver Smith <osmith@netvirta.com>
  • Loading branch information
2 people authored and GitHub committed Jul 17, 2025
1 parent 325c3fe commit 83b68fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/karpenter/policy.tf
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ data "aws_iam_policy_document" "v1" {
condition {
test = "StringEquals"
variable = "iam:PassedToService"
values = ["ec2.${local.dns_suffix}"]
values = distinct(["ec2.${local.dns_suffix}", "ec2.amazonaws.com"])
}
}

Expand Down

0 comments on commit 83b68fd

Please sign in to comment.