Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It'd be nice to have an exclude list instead of an include list #187

Open
tvaughanRR opened this issue Aug 31, 2023 · 0 comments
Open

It'd be nice to have an exclude list instead of an include list #187

tvaughanRR opened this issue Aug 31, 2023 · 0 comments

Comments

@tvaughanRR
Copy link

Is your feature request related to a problem? Please describe.
Using this module really simplifies the setup needed to get AWS Config running -- thank you! One thing we noticed when we implemented it was that we were generating $50/day or more in AWS Config costs because the AWS::EC2::NetworkInterface resource type was included by default (and our particular accounts have a lot of autoscaling and short-lived ECS tasks popping in and out of existence which generates a lot of NetworkInterface creation/deletion events).

When looking at the variables and the source code of this module, it looks like it's straight-forward to add an inclusive list of resource types to track, but I don't see how to do "the opposite." Without being able to defined an exclude list, the use of this module to exclude the AWS::EC2::NetworkInterface resource type looks like this:

module "aws_config" {
  count   = var.enabled ? 1 : 0
  source  = "trussworks/config/aws"
  version = "6.1.0"
...snip

  # This is "everything except for AWS::EC2::NetworkInterface"
  # For the list of available resource types, see the documentation under the `--resource-type` Options here:
  # https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configservice/list-discovered-resources.html
  resource_types = [
    "AWS::EC2::CustomerGateway",
    "AWS::EC2::EIP",

... snip 350 lines ....

    "AWS::Pinpoint::EmailChannel",
    "AWS::S3::AccessPoint",
    "AWS::NetworkManager::CustomerGatewayAssociation",
    "AWS::NetworkManager::LinkAssociation",
  ]

Describe the solution you'd like
It would be cool if there was the ability to have an exclude_resource_type list so that the use of the module looks like:

module "aws_config" {
  count   = var.enabled ? 1 : 0
  source  = "trussworks/config/aws"
  version = "6.1.0"

  exclude_resource_types = [
    "AWS::EC2::NetworkInterface"
  ]
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

No branches or pull requests

1 participant