Skip to content

Commit 081c762

Browse files
authored
fix: Replace Karpenter SQS policy dynamic service princpal DNS suffixes with static amazonaws.com (#2941)
fix: Replace dynamic service princpal DNS suffixes with static `amazonaws.com`
1 parent d63fd61 commit 081c762

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.86.0
3+
rev: v1.87.1
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_validate

modules/karpenter/main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ data "aws_caller_identity" "current" {}
44

55
locals {
66
account_id = data.aws_caller_identity.current.account_id
7-
dns_suffix = data.aws_partition.current.dns_suffix
87
partition = data.aws_partition.current.partition
98
region = data.aws_region.current.name
109
}
@@ -445,8 +444,8 @@ data "aws_iam_policy_document" "queue" {
445444
principals {
446445
type = "Service"
447446
identifiers = [
448-
"events.${local.dns_suffix}",
449-
"sqs.${local.dns_suffix}",
447+
"events.amazonaws.com",
448+
"sqs.amazonaws.com",
450449
]
451450
}
452451
}

0 commit comments

Comments
 (0)