This template sets up the necessary resources to accept an invitation to AWS Security Hub from a master account.

Terraform Template

resource "aws_securityhub_account" "example" {
}

resource "aws_securityhub_account" "invitee" {
  provider = "aws.invitee"
}

resource "aws_securityhub_invite_accepter" "invitee" {
  depends_on = ["aws_securityhub_account.invitee"]
  master_id = aws_securityhub_member.example.master_id
  provider = "aws.invitee"
}

resource "aws_securityhub_member" "example" {
  account_id = "123456789012"
  email = "example@example.com"
  invite = true
}