Skip to content

Latest commit

 

History

History
110 lines (84 loc) · 1.78 KB

aws_ec2_transit_gateway_route_tables.md

File metadata and controls

110 lines (84 loc) · 1.78 KB

aws_ec2_transit_gateway_route_tables

back

Index

Terraform

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

top

Example Usage

module "aws_ec2_transit_gateway_route_tables" {
  source = "./modules/aws/d/aws_ec2_transit_gateway_route_tables"

  # tags - (optional) is a type of map of string
  tags = {}

  filter = [{
    name   = null
    values = []
  }]
}

top

Variables

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

variable "filter" {
  description = "nested block: NestingSet, min items: 0, max items: 0"
  type = set(object(
    {
      name   = string
      values = set(string)
    }
  ))
  default = []
}

top

Datasource

data "aws_ec2_transit_gateway_route_tables" "this" {
  # tags - (optional) is a type of map of string
  tags = var.tags

  dynamic "filter" {
    for_each = var.filter
    content {
      # name - (required) is a type of string
      name = filter.value["name"]
      # values - (required) is a type of set of string
      values = filter.value["values"]
    }
  }

}

top

Outputs

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

output "ids" {
  description = "returns a set of string"
  value       = data.aws_ec2_transit_gateway_route_tables.this.ids
}

output "tags" {
  description = "returns a map of string"
  value       = data.aws_ec2_transit_gateway_route_tables.this.tags
}

output "this" {
  value = aws_ec2_transit_gateway_route_tables.this
}

top