Skip to content

Latest commit

 

History

History
203 lines (160 loc) · 3.46 KB

aws_wafv2_web_acl_logging_configuration.md

File metadata and controls

203 lines (160 loc) · 3.46 KB

aws_wafv2_web_acl_logging_configuration

back

Index

Terraform

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

top

Example Usage

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

  # log_destination_configs - (required) is a type of set of string
  log_destination_configs = []
  # resource_arn - (required) is a type of string
  resource_arn = null

  redacted_fields = [{
    all_query_arguments = [{

    }]
    body = [{

    }]
    method = [{

    }]
    query_string = [{

    }]
    single_header = [{
      name = null
    }]
    single_query_argument = [{
      name = null
    }]
    uri_path = [{

    }]
  }]
}

top

Variables

variable "log_destination_configs" {
  description = "(required) - AWS Kinesis Firehose Delivery Stream ARNs"
  type        = set(string)
}

variable "resource_arn" {
  description = "(required) - AWS WebACL ARN"
  type        = string
}

variable "redacted_fields" {
  description = "nested block: NestingList, min items: 0, max items: 100"
  type = set(object(
    {
      all_query_arguments = list(object(
        {

        }
      ))
      body = list(object(
        {

        }
      ))
      method = list(object(
        {

        }
      ))
      query_string = list(object(
        {

        }
      ))
      single_header = list(object(
        {
          name = string
        }
      ))
      single_query_argument = list(object(
        {
          name = string
        }
      ))
      uri_path = list(object(
        {

        }
      ))
    }
  ))
  default = []
}

top

Resource

resource "aws_wafv2_web_acl_logging_configuration" "this" {
  # log_destination_configs - (required) is a type of set of string
  log_destination_configs = var.log_destination_configs
  # resource_arn - (required) is a type of string
  resource_arn = var.resource_arn

  dynamic "redacted_fields" {
    for_each = var.redacted_fields
    content {

      dynamic "all_query_arguments" {
        for_each = redacted_fields.value.all_query_arguments
        content {
        }
      }

      dynamic "body" {
        for_each = redacted_fields.value.body
        content {
        }
      }

      dynamic "method" {
        for_each = redacted_fields.value.method
        content {
        }
      }

      dynamic "query_string" {
        for_each = redacted_fields.value.query_string
        content {
        }
      }

      dynamic "single_header" {
        for_each = redacted_fields.value.single_header
        content {
          # name - (required) is a type of string
          name = single_header.value["name"]
        }
      }

      dynamic "single_query_argument" {
        for_each = redacted_fields.value.single_query_argument
        content {
          # name - (required) is a type of string
          name = single_query_argument.value["name"]
        }
      }

      dynamic "uri_path" {
        for_each = redacted_fields.value.uri_path
        content {
        }
      }

    }
  }

}

top

Outputs

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

output "this" {
  value = aws_wafv2_web_acl_logging_configuration.this
}

top