Provides a Security Hub member resource.
resource "aws_securityhub_account" "example" {}
resource "aws_securityhub_member" "example" {
depends_on = [aws_securityhub_account.example]
account_id = "123456789012"
email = "example@example.com"
invite = true
}
This resource supports the following arguments:
account_id
- (Required) The ID of the member AWS account.email
- (Optional) The email of the member AWS account.invite
- (Optional) Boolean whether to invite the account to Security Hub as a member. Defaults to false
.This resource exports the following attributes in addition to the arguments above:
id
- The ID of the member AWS account (matches account_id
).master_id
- The ID of the master Security Hub AWS account.member_status
- The status of the member account relationship.In Terraform v1.5.0 and later, use an import
block to import Security Hub members using their account ID. For example:
import {
to = aws_securityhub_member.example
id = "123456789012"
}
Using terraform import
, import Security Hub members using their account ID. For example:
% terraform import aws_securityhub_member.example 123456789012