Skip to content

Commit

Permalink
fix: Replace Karpenter SQS policy dynamic service princpal DNS suffix…
Browse files Browse the repository at this point in the history
…es with static `amazonaws.com` (#2941)

fix: Replace dynamic service princpal DNS suffixes with static `amazonaws.com`
  • Loading branch information
bryantbiggs committed Feb 21, 2024
1 parent d63fd61 commit 081c762
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.86.0
rev: v1.87.1
hooks:
- id: terraform_fmt
- id: terraform_validate
Expand Down
5 changes: 2 additions & 3 deletions modules/karpenter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ 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
}
Expand Down Expand Up @@ -445,8 +444,8 @@ data "aws_iam_policy_document" "queue" {
principals {
type = "Service"
identifiers = [
"events.${local.dns_suffix}",
"sqs.${local.dns_suffix}",
"events.amazonaws.com",
"sqs.amazonaws.com",
]
}
}
Expand Down

0 comments on commit 081c762

Please sign in to comment.