Skip to content

Add exclusion_by_resource_types to exclude resource types from recording - #142

Open
Arkoprabho Chakraborti (Arkoprabho) wants to merge 11 commits into
cloudposse:mainfrom
Linx-Health:feature/exclusion-by-resource-types
Open

Arkoprabho Chakraborti (Arkoprabho) wants to merge 11 commits into
cloudposse:mainfrom
Linx-Health:feature/exclusion-by-resource-types

Conversation

@Arkoprabho

Copy link
Copy Markdown

Feature: Support for AWS Config Resource Type Exclusions

Added support for excluding specific AWS resource types from AWS Config recording.
Users can now specify a list of resource types to exclude using the new variable
exclusion_by_resource_types.

Example

exclusion_by_resource_types = [
  "AWS::Config::ResourceCompliance",
  "AWS::CloudWatch::Alarm"
]

Changes

  • Added variable exclusion_by_resource_types.
  • Default value: null - preserves previous behavior.
  • Added dynamic blocks to the aws_config_configuration_recorder resource. These blocks are evaluated only when exclusion_by_resource_types is not null and not empty.
  • The fields all_supported and include_global_resource_types become false if a proper exclusion_by_resource_types is provided.

@Arkoprabho

Copy link
Copy Markdown
Author

I have made no new changes to this. Just taking over from the PR here: #133
Have tried to preserve commit attribution, while syncing with latest main

@osterman Erik Osterman (Cloud Posse) (osterman) changed the title Support for AWS Config Resource Type Exclusions Add exclusion_by_resource_types to exclude resource types from recording Oct 17, 2026
@osterman Erik Osterman (Cloud Posse) (osterman) added the minor New features that do not break anything label Oct 17, 2026 — with Claude Github MCP Connector

Copy link
Copy Markdown
Member

Thank you. Please make these changes:

  1. Set default = [] and nullable = false on exclusion_by_resource_types. Use length(var.exclusion_by_resource_types) > 0 in the local.
  2. Run terraform fmt. The new local in main.tf is not aligned.
  3. In exclusion mode, include_global_resource_types has no effect. AWS records AWS::IAM::User, AWS::IAM::Group, AWS::IAM::Role and AWS::IAM::Policy in each Region if you do not exclude them. Outside the global recorder Region, add these four types to the exclusions.
  4. Remove the text "Conflicts with resource_types (not implemented yet)".

@Arkoprabho

Copy link
Copy Markdown
Author

Erik Osterman (Cloud Posse) (@osterman) Thanks for the comments. Addressed them in my latest changes.

This branch has not been deployed

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

Labels

minor New features that do not break anything triage Needs triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants