Skip to content

Resource: awsGuarddutyOrganizationAdminAccount

Manages a GuardDuty Organization Admin Account. The AWS account utilizing this resource must be an Organizations primary account. More information about Organizations support in GuardDuty can be found in the GuardDuty User Guide.

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.guarddutyDetector.GuarddutyDetector(this, "example", {});
const awsOrganizationsOrganizationExample =
  new aws.organizationsOrganization.OrganizationsOrganization(
    this,
    "example_1",
    {
      awsServiceAccessPrincipals: ["guardduty.amazonaws.com"],
      featureSet: "ALL",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsOrganizationsOrganizationExample.overrideLogicalId("example");
const awsGuarddutyOrganizationAdminAccountExample =
  new aws.guarddutyOrganizationAdminAccount.GuarddutyOrganizationAdminAccount(
    this,
    "example_2",
    {
      adminAccountId: "123456789012",
      depends_on: [`\${${awsOrganizationsOrganizationExample.fqn}}`],
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsGuarddutyOrganizationAdminAccountExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • adminAccountId - (Required) AWS account identifier to designate as a delegated administrator for GuardDuty.

Attributes Reference

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

  • id - AWS account identifier.

Import

GuardDuty Organization Admin Account can be imported using the AWS account ID, e.g.,

$ terraform import aws_guardduty_organization_admin_account.example 123456789012