Skip to content

feat: Add opt-in aws:SourceAccount condition to Karpenter node IAM role trust policy#3695

Merged
bryantbiggs merged 2 commits into
terraform-aws-modules:masterfrom
alien2003:feat/karpenter-node-iam-source-account-condition
May 6, 2026
Merged

feat: Add opt-in aws:SourceAccount condition to Karpenter node IAM role trust policy#3695
bryantbiggs merged 2 commits into
terraform-aws-modules:masterfrom
alien2003:feat/karpenter-node-iam-source-account-condition

Conversation

@alien2003

@alien2003 alien2003 commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a new node_iam_role_source_account_condition variable to the karpenter sub-module. When set to true, an aws:SourceAccount condition scoped to the current account is added to the node IAM role's sts:AssumeRole trust statement.

Motivation and Context

Resolves #3688

Breaking Changes

None.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@bryantbiggs bryantbiggs merged commit 0515ad6 into terraform-aws-modules:master May 6, 2026
23 checks passed
antonbabenko pushed a commit that referenced this pull request May 6, 2026
## [21.20.0](v21.19.1...v21.20.0) (2026-05-06)

### Features

* Add opt-in `aws:SourceAccount` condition to Karpenter node IAM role trust policy ([#3695](#3695)) ([0515ad6](0515ad6)), closes [#3688](#3688)
@antonbabenko

Copy link
Copy Markdown
Member

This PR is included in version 21.20.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can we add a conditional in the node role?

3 participants