Configures an AWS Security Hub administrator account within an AWS Organizations setup, enabling Security Hub automatically for all member accounts.

Terraform Template

resource "aws_organizations_organization" "example" {
  aws_service_access_principals = ["securityhub.amazonaws.com"]
  feature_set = "ALL"
}

resource "aws_securityhub_account" "example" {
}

resource "aws_securityhub_organization_admin_account" "example" {
  admin_account_id = "123456789012"
  depends_on = ["aws_organizations_organization.example"]
}

resource "aws_securityhub_organization_configuration" "example" {
  auto_enable = true
}