hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.87k stars 9.21k forks source link

[New]: Inspector2 Suppression Rules #34165

Open tormodmacleod opened 1 year ago

tormodmacleod commented 1 year ago

Description

hello

i'm looking at Amazon Inspector2 and I can't see a resource for suppression rules. currently the only listed resources are

i've had a look at the documentation for each just to be sure that they aren't the thing i'm looking for by another name

i also had a look at https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/inspector2 and there appears to be support for filters which i understand are what's used to create suppression rules

a search of this project's issues only turned up a single comment in which someone else was looking for the same thing https://github.com/hashicorp/terraform-provider-aws/issues/22330#issuecomment-1029576446

please forgive me if this is already achievable by some other means and i'm being a dafty

Requested Resource(s) and/or Data Source(s)

aws_inspector2_suppression_rule :shr

Potential Terraform Configuration

resource "aws_inspector2_suppression_rule" "example" {
  name        = "my-suppression-rule"
  description = "blah"

  filter {
    criteria   = "Title"
    comparison = "EQUALS"
    value      = "CWE-798 - Hardcoded credentials"
  }

  filter {
    criteria   = "File path"
    comparison = "PREFIX"
    value      = "tests/"
  }
}

References

https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/inspector2

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

para0056 commented 4 months ago

Any updates on whether this resource can be added to the AWS provider?

b-dean commented 2 months ago

There's a resource to make these in the awscc provider: https://registry.terraform.io/providers/hashicorp/awscc/latest/docs/resources/inspectorv2_filter

rrossouw01 commented 1 month ago

Correct @b-dean that is a workaround but awscc also lags. we could not even do filter on fixAvailable which is possible in console and CLI.