mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-16 00:34:31 +01:00
fix: Correct Karpenter EC2 service principal DNS suffix in non-commercial regions (#3157)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
repos:
|
||||
- repo: https://github.com/antonbabenko/pre-commit-terraform
|
||||
rev: v1.95.0
|
||||
rev: v1.96.0
|
||||
hooks:
|
||||
- id: terraform_fmt
|
||||
- id: terraform_docs
|
||||
|
||||
@@ -4,6 +4,7 @@ data "aws_caller_identity" "current" {}
|
||||
|
||||
locals {
|
||||
account_id = data.aws_caller_identity.current.account_id
|
||||
dns_suffix = data.aws_partition.current.dns_suffix
|
||||
partition = data.aws_partition.current.partition
|
||||
region = data.aws_region.current.name
|
||||
}
|
||||
@@ -286,7 +287,7 @@ data "aws_iam_policy_document" "node_assume_role" {
|
||||
|
||||
principals {
|
||||
type = "Service"
|
||||
identifiers = ["ec2.amazonaws.com"]
|
||||
identifiers = ["ec2.${local.dns_suffix}"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user