Difference between revisions of "Each."

From wikieduonline
Jump to navigation Jump to search
Line 6: Line 6:
 
  }
 
  }
  
 +
 +
data "aws_subnets" "all_app" {
 +
  filter {
 +
    name  = "vpc-id"
 +
    values = [var.vpc_id]
 +
  }
 +
 +
  tags = {
 +
    Tier = "WebApp"
 +
  }
 +
}
  
  
 
{{data.}}
 
{{data.}}

Revision as of 07:23, 3 April 2023

data "aws_subnet" "all_db" {
 for_each = toset(data.aws_subnets.all_db.ids)
 id       = each.value
}


data "aws_subnets" "all_app" {
 filter {
   name   = "vpc-id"
   values = [var.vpc_id]
 }
 tags = {
   Tier = "WebApp"
 }
}


data., toset, each.

Advertising: