Difference between revisions of "Terraform: data.aws subnets"

From wikieduonline
Jump to navigation Jump to search
Line 8: Line 8:
 
   id      = [[each.]]value
 
   id      = [[each.]]value
 
  }
 
  }
 +
 +
[[subnet_id]] = [[element]](data.aws_subnets.all_private.ids, 0)
  
  
 
{{data.}}
 
{{data.}}

Revision as of 17:22, 6 April 2023


data.
data "aws_subnet" "all_db" {
  for_each = toset(data.aws_subnets.all_db.ids)
  id       = each.value
}
subnet_id = element(data.aws_subnets.all_private.ids, 0)


data., toset, each.

Advertising: