Creates a Security Hub custom insight to filter findings based on a date range of the last 5 days.

Terraform Template

resource "aws_securityhub_account" "example" {
}

resource "aws_securityhub_insight" "example" {
  depends_on = ["aws_securityhub_account.example"]
  group_by_attribute = "CreatedAt"
  name = "example-insight"
}