This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
[WIP] Add tags to IAM Role Policy Attachment resource #663
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.
We're working on a use-case that requires us to filter IAM resources by their tags.
IAM roles are already filterable by tags
IAM policies will be filterable by tags starting with #662
However, if we don't delete the role or the policy, then we should also not remove the attachment. There is currently no way to filter out attachments based on the role they are attached to.
This PR adds a new field to the resource's properties,
roleTag
, which you can filter on.A note about the tag property name
Since the attachment itself does not have any tags, I decided to use the tags from the role. To be more reflective of the actual resource, and to prevent confusion, I went with
roleTag
instead oftag
. This means that in order to filter out anIAMRolePolicyAttachment
by tag, you would need to do something like this instead (just use "roleTag"):Somebody could probably also convince me to add in the policy tags too...