AWS Security Hub Member

This page shows how to write Terraform for Security Hub Member and write them securely.

aws_securityhub_member (Terraform)

The Member in Security Hub can be configured in Terraform with the resource name aws_securityhub_member. The following sections describe 4 examples of how to use the resource and its parameters.

Example Usage from GitHub
resource "aws_securityhub_member" "this" {
  account_id = var.account_id
  email      =
  invite     = true
resource "aws_securityhub_member" "this" {
  account_id = var.account_id
  email      =
  invite     = var.invite
resource "aws_securityhub_member" "example" {
  count = var.enable_member_account && var.enable ? 1 : 0

  depends_on = [aws_securityhub_account.security_hub]
  account_id = var.member_account_id
  email      = var.member_mail_id
resource "aws_securityhub_member" "security_hub_member" {
  depends_on = [aws_securityhub_account.security_hub]
  count      = length(var.account_ids)
  account_id = var.account_ids[count.index]
  email      = var.email_ids[count.index]
  invite     = var.enable_security_hub

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).


Explanation in Terraform Registry

Provides a Security Hub member resource.

CloudFormation Example

CloudFormation code does not have the related resource.

Frequently asked questions

What is AWS Security Hub Member?

AWS Security Hub Member is a resource for Security Hub of Amazon Web Service. Settings can be wrote in Terraform.

Where can I find the example code for the AWS Security Hub Member?

For Terraform, the plus3it/terraform-aws-tardigrade-security-hub, niveklabs/aws and clouddrove/terraform-aws-security-hub source code examples are useful. See the Terraform Example section for further details.


Automate config file reviews on your commits

Fix issues in your infrastructure as code with auto-generated patches.