Resource: aws_guardduty_member

Provides a resource to manage a GuardDuty member. To accept invitations in member accounts, see the aws_guardduty_invite_accepter resource.

Example Usage

resource "aws_guardduty_detector" "primary" {
  enable = true
}

resource "aws_guardduty_detector" "member" {
  provider = aws.dev

  enable = true
}

resource "aws_guardduty_member" "member" {
  account_id         = aws_guardduty_detector.member.account_id
  detector_id        = aws_guardduty_detector.primary.id
  email              = "required@example.com"
  invite             = true
  invitation_message = "please accept guardduty invitation"
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import GuardDuty members using the primary GuardDuty detector ID and member AWS account ID. For example:

import {
  to = aws_guardduty_member.MyMember
  id = "00b00fd5aecc0ab60a708659477e9617:123456789012"
}

Using terraform import, import GuardDuty members using the primary GuardDuty detector ID and member AWS account ID. For example:

% terraform import aws_guardduty_member.MyMember 00b00fd5aecc0ab60a708659477e9617:123456789012