Skip to content

Latest commit

 

History

History
100 lines (75 loc) · 1.46 KB

aws_autoscaling_groups.md

File metadata and controls

100 lines (75 loc) · 1.46 KB

aws_autoscaling_groups

back

Index

Terraform

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

top

Example Usage

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


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

top

Variables

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_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

Outputs

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