Skip to content

Commit

Permalink
update aws_subnet_ids -> aws_subnets
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Mar 29, 2022
1 parent 70dd2a3 commit cb3a333
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions examples/full-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ data "aws_vpc" "eks_vpc" {
}
}

data "aws_subnet_ids" "subnets" {
vpc_id = data.aws_vpc.eks_vpc.id
data "aws_subnets" "subnets" {
filter {
name = "tag:Name"
values = [var.subnets_name]
}
filter {
name = "vpc-id"
values = [data.aws_vpc.eks_vpc.id]
}
}

data "aws_subnet" "subnets" {
for_each = toset(data.aws_subnet_ids.subnets.ids)
for_each = toset(data.aws_subnets.subnets.ids)
id = each.key
}

Expand Down

0 comments on commit cb3a333

Please sign in to comment.