Skip to content

Latest commit

 

History

History
129 lines (102 loc) · 2.41 KB

aws_wafregional_size_constraint_set.md

File metadata and controls

129 lines (102 loc) · 2.41 KB

aws_wafregional_size_constraint_set

back

Index

Terraform

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

top

Example Usage

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

  # name - (required) is a type of string
  name = null

  size_constraints = [{
    comparison_operator = null
    field_to_match = [{
      data = null
      type = null
    }]
    size                = null
    text_transformation = null
  }]
}

top

Variables

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

variable "size_constraints" {
  description = "nested block: NestingSet, min items: 0, max items: 0"
  type = set(object(
    {
      comparison_operator = string
      field_to_match = list(object(
        {
          data = string
          type = string
        }
      ))
      size                = number
      text_transformation = string
    }
  ))
  default = []
}

top

Resource

resource "aws_wafregional_size_constraint_set" "this" {
  # name - (required) is a type of string
  name = var.name

  dynamic "size_constraints" {
    for_each = var.size_constraints
    content {
      # comparison_operator - (required) is a type of string
      comparison_operator = size_constraints.value["comparison_operator"]
      # size - (required) is a type of number
      size = size_constraints.value["size"]
      # text_transformation - (required) is a type of string
      text_transformation = size_constraints.value["text_transformation"]

      dynamic "field_to_match" {
        for_each = size_constraints.value.field_to_match
        content {
          # data - (optional) is a type of string
          data = field_to_match.value["data"]
          # type - (required) is a type of string
          type = field_to_match.value["type"]
        }
      }

    }
  }

}

top

Outputs

output "arn" {
  description = "returns a string"
  value       = aws_wafregional_size_constraint_set.this.arn
}

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

output "this" {
  value = aws_wafregional_size_constraint_set.this
}

top