back
terraform {
required_providers {
aws = ">= 3.35.0"
}
}
top
module "aws_ec2_coip_pools" {
source = "./modules/aws/d/aws_ec2_coip_pools"
# tags - (optional) is a type of map of string
tags = {}
filter = [{
name = null
values = []
}]
}
top
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
data "aws_ec2_coip_pools" "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
output "id" {
description = "returns a string"
value = data.aws_ec2_coip_pools.this.id
}
output "pool_ids" {
description = "returns a set of string"
value = data.aws_ec2_coip_pools.this.pool_ids
}
output "tags" {
description = "returns a map of string"
value = data.aws_ec2_coip_pools.this.tags
}
output "this" {
value = aws_ec2_coip_pools.this
}
top