Skip to content

Resource: awsSecurityhubMember

Provides a Security Hub member resource.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsSecurityhubAccountExample =
  new aws.securityhubAccount.SecurityhubAccount(this, "example", {});
const awsSecurityhubMemberExample = new aws.securityhubMember.SecurityhubMember(
  this,
  "example_1",
  {
    accountId: "123456789012",
    depends_on: [`\${${awsSecurityhubAccountExample.fqn}}`],
    email: "example@example.com",
    invite: true,
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsSecurityhubMemberExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • accountId - (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.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The ID of the member AWS account (matches accountId).
  • masterId - The ID of the master Security Hub AWS account.
  • memberStatus - The status of the member account relationship.

Import

Security Hub members can be imported using their account ID, e.g.,

$ terraform import aws_securityhub_member.example 123456789012