Skip to content

Latest commit

 

History

History
119 lines (93 loc) · 2.1 KB

aws_macie_s3_bucket_association.md

File metadata and controls

119 lines (93 loc) · 2.1 KB

aws_macie_s3_bucket_association

back

Index

Terraform

terraform {
  required_providers {
    aws = ">= 3.35.0"
  }
}

top

Example Usage

module "aws_macie_s3_bucket_association" {
  source = "./modules/aws/r/aws_macie_s3_bucket_association"

  # bucket_name - (required) is a type of string
  bucket_name = null
  # member_account_id - (optional) is a type of string
  member_account_id = null
  # prefix - (optional) is a type of string
  prefix = null

  classification_type = [{
    continuous = null
    one_time   = null
  }]
}

top

Variables

variable "bucket_name" {
  description = "(required)"
  type        = string
}

variable "member_account_id" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "prefix" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "classification_type" {
  description = "nested block: NestingList, min items: 0, max items: 1"
  type = set(object(
    {
      continuous = string
      one_time   = string
    }
  ))
  default = []
}

top

Resource

resource "aws_macie_s3_bucket_association" "this" {
  # bucket_name - (required) is a type of string
  bucket_name = var.bucket_name
  # member_account_id - (optional) is a type of string
  member_account_id = var.member_account_id
  # prefix - (optional) is a type of string
  prefix = var.prefix

  dynamic "classification_type" {
    for_each = var.classification_type
    content {
      # continuous - (optional) is a type of string
      continuous = classification_type.value["continuous"]
      # one_time - (optional) is a type of string
      one_time = classification_type.value["one_time"]
    }
  }

}

top

Outputs

output "id" {
  description = "returns a string"
  value       = aws_macie_s3_bucket_association.this.id
}

output "this" {
  value = aws_macie_s3_bucket_association.this
}

top