Skip to content

Resource: awsSecurityhubInviteAccepter

-> Note: AWS accounts can only be associated with a single Security Hub master account. Destroying this resource will disassociate the member account from the master account.

Accepts a Security Hub invitation.

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";
new aws.securityhubAccount.SecurityhubAccount(this, "example", {});
const awsSecurityhubAccountInvitee =
  new aws.securityhubAccount.SecurityhubAccount(this, "invitee", {
    provider: "aws.invitee",
  });
const awsSecurityhubMemberExample = new aws.securityhubMember.SecurityhubMember(
  this,
  "example_2",
  {
    accountId: "123456789012",
    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");
const awsSecurityhubInviteAccepterInvitee =
  new aws.securityhubInviteAccepter.SecurityhubInviteAccepter(
    this,
    "invitee_3",
    {
      depends_on: [`\${${awsSecurityhubAccountInvitee.fqn}}`],
      masterId: awsSecurityhubMemberExample.masterId,
      provider: "aws.invitee",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsSecurityhubInviteAccepterInvitee.overrideLogicalId("invitee");

Argument Reference

The following arguments are supported:

  • masterId - (Required) The account ID of the master Security Hub account whose invitation you're accepting.

Attributes Reference

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

  • invitationId - The ID of the invitation.

Import

Security Hub invite acceptance can be imported using the account ID, e.g.,

$ terraform import aws_securityhub_invite_accepter.example 123456789012