back
terraform {
required_providers {
aws = ">= 3.35.0"
}
}
top
module "aws_autoscaling_groups" {
source = "./modules/aws/d/aws_autoscaling_groups"
filter = [{
name = null
values = []
}]
}
top
variable "filter" {
description = "nested block: NestingSet, min items: 0, max items: 0"
type = set(object(
{
name = string
values = set(string)
}
))
default = []
}
top
data "aws_autoscaling_groups" "this" {
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 "arns" {
description = "returns a list of string"
value = data.aws_autoscaling_groups.this.arns
}
output "id" {
description = "returns a string"
value = data.aws_autoscaling_groups.this.id
}
output "names" {
description = "returns a list of string"
value = data.aws_autoscaling_groups.this.names
}
output "this" {
value = aws_autoscaling_groups.this
}
top