Skip to content

Commit

Permalink
Merge pull request #769 from wking/drop-data-aws-route-table
Browse files Browse the repository at this point in the history
data/aws/vpc: Drop aws_route_table data blocks
  • Loading branch information
openshift-merge-robot authored Dec 1, 2018
2 parents bc09e02 + c80edad commit 5ed6f32
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions data/data/aws/vpc/common.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,8 @@ locals {
}

# all data sources should be input variable-agnostic and used as canonical source for querying "state of resources" and building outputs
# (ie: we don't want "data.aws_subnet.external-worker" and "data.aws_subnet.worker". just "data.aws_subnet.worker" used everwhere for list of worker subnets for any valid input var state)
# (ie: we don't want "aws.new_vpc" and "data.aws_vpc.cluster_vpc", just "data.aws_vpc.cluster_vpc" used everwhere).

data "aws_vpc" "cluster_vpc" {
id = "${local.vpc_id}"
}

data "aws_subnet" "worker" {
count = "${local.worker_subnet_count}"
id = "${local.worker_subnet_ids[count.index]}"
vpc_id = "${local.vpc_id}"
}

data "aws_subnet" "master" {
count = "${local.master_subnet_count}"
id = "${local.master_subnet_ids[count.index]}"
vpc_id = "${local.vpc_id}"
}

data "aws_route_table" "worker" {
count = "${local.worker_subnet_count}"

filter = {
name = "association.subnet-id"
values = ["${list(local.worker_subnet_ids[count.index])}"]
}
}

data "aws_route_table" "master" {
count = "${local.master_subnet_count}"

filter = {
name = "association.subnet-id"
values = ["${list(local.master_subnet_ids[count.index])}"]
}
}

0 comments on commit 5ed6f32

Please sign in to comment.