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.63k stars 9.01k forks source link

[New Data Source]: aws_securityhub_finding(s) #37888

Open nitrocode opened 1 month ago

nitrocode commented 1 month ago

Description

I'd like to retrieve data on findings such as the product ARN of a specific finding. This would allow me to continue suppressing findings in code without having to hard code the ARN

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

Potential Terraform Configuration

# returns one result or an error
data "aws_securityhub_finding" {
  filter {
    name       = "AwsAccountId"
    comparison = "EQUALS"
    value      = "012345678912"
  }

  filter {
    name       = "Id"
    comparison = "EQUALS"
    value      = "<findings-id>"
  }
}
# similar to above only it returns zero or a list
data "aws_securityhub_findings" {

References

Would you like to implement a fix?

None

github-actions[bot] commented 1 month ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue