Skip to content

Commit

Permalink
Fix bug with routing table filtering (#16)
Browse files Browse the repository at this point in the history
* Fix bug with routing table filtering

* Fix tests
  • Loading branch information
snovikov authored Oct 14, 2020
1 parent 141cc9a commit c6cf78b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ data "aws_subnet_ids" "private" {

data "aws_route_table" "this" {
provider = aws.satellite
count = local.create ? length(data.aws_subnet_ids.this[0].ids) : 0
count = local.create ? length(data.aws_subnet_ids.private[0].ids) : 0

subnet_id = sort(data.aws_subnet_ids.private[0].ids)[count.index]
}
Expand Down
11 changes: 10 additions & 1 deletion examples/satellite-all/variables.auto.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,13 @@ transit_gateway_hub_name = "test-tgw-fixture"

route_entire_satellite_vpc = true

private_subnet_filters = []
private_subnet_filters = [
{
name = "tag:Name"
values = ["*private*"]
},
{
name = "availability-zone"
values = ["eu-central-1a", "eu-central-1b"]
}
]
4 changes: 2 additions & 2 deletions examples/satellite-default-route/variables.auto.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ hub_destination_cidr_blocks = ["8.8.4.4/32", "8.8.8.8/32"]
attachment_subnet_filters = [
{
name = "tag:Name"
values = ["*private*"]
values = ["*public*"]
},
{
name = "availability-zone"
values = ["eu-central-1a", "eu-central-1b"]
values = ["eu-central-1c"]
}
]

Expand Down

0 comments on commit c6cf78b

Please sign in to comment.