Repository navigation
Set an optional permissions boundary on the IAM role, by policy name - #56
Merged
Merged
Conversation
`iam_role_permissions_boundary` sets the boundary when the role is created. `ignore_changes` keeps existing roles as they are when the variable is set later, so adopting it never changes what a running function may do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Secrets | Nov 19, 2026 11:29a.m. | Review ↗ | |
| Terraform | Nov 19, 2026 11:29a.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
A policy's ARN includes its account. A name that exists in every account lets callers pass one value whatever account the role is in; the module builds the ARN from the role's account. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
akarolmv
marked this pull request as ready for review
November 19, 2026 11:47
unsign3d
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
iam_role_permissions_boundary_name, the name of a policy set as the permissions boundary of the function's IAM role. The module builds the policy's ARN from the account the role is created in, so callers can pass one name that exists in every account. It defaults tonull, so nothing changes for existing callers.The boundary is set only when the role is created (
lifecycle { ignore_changes = [permissions_boundary] }). A caller that sets the variable on an existing function gets no change to that function's role, so adopting it can't break what the function does at runtime. Only roles created afterwards, or replaced, carry the boundary._testsets the variable, andterraform validatepasses.🤖 Generated with Claude Code