Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

fix(IAMInstanceProfileRole): Fix instance profile role glob filtering #982

Merged
merged 3 commits into from
Aug 25, 2023
Merged

fix(IAMInstanceProfileRole): Fix instance profile role glob filtering #982

merged 3 commits into from
Aug 25, 2023

Conversation

jrarmstro
Copy link
Contributor

@jrarmstro jrarmstro commented Apr 21, 2023

Changes in #914 released in v2.22.0 broke glob-based filtering for IAMInstanceProfileRoles.

Sample configuration:

accounts:
  "000000000000":
    presets:
    - "example"

presets:
  example:
    filters:
      IAMInstanceProfileRole:
      - type: glob
        value: "some_instance_profile -> *"

Behaviour in v2.21.2:

global - IAMInstanceProfileRole - some_instance_profile -> SomeInstanceRole - [tags redacted] - filtered by config

Behaviour in v2.22.1:

global - IAMInstanceProfileRole - some_instance_profile -> {
  Arn: "arn:aws:iam::000000000000:role/SomeInstanceRole",
  AssumeRolePolicyDocument: "redacted",
  CreateDate: 2019-09-12 14:42:53 +0000 UTC,
  Path: "/",
  RoleId: "redacted",
  RoleName: "SomeInstanceRole"
} - [tags redacted] - would remove

Behaviour with this fix:

global - IAMInstanceProfileRole - some_instance_profile -> SomeInstanceRole - [tags redacted] - filtered by config

The role:* tags are still present with this fix:

global - IAMInstanceProfileRole - some_instance_profile -> SomeInstanceRole - [InstanceProfile: "some_instance_profile", InstanceRole: "SomeInstanceRole", role:CreateDate: "2021-10-14T18:22:13Z", role:LastUsedDate: "2021-10-14T18:22:13Z", role:Path: "/", tags redacted] - filtered by config

@jrarmstro jrarmstro requested a review from a team as a code owner April 21, 2023 18:08
@der-eismann der-eismann enabled auto-merge (squash) August 25, 2023 14:35
@der-eismann der-eismann merged commit ab396a4 into rebuy-de:main Aug 25, 2023
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants