-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Labels
Description
Describe the bug
When user specifies any subnet that is not associated with route table in vpc as value in variables:
peer_subnets_idsthis_subnet_ids
then module is unable to find route tables for these subnets and fails to peer vpcs
Terraform version: 1.5.6
Module version: 6.0.0
Error message:
Error: query returned no results. Please change your search criteria and try again
│
│ with module.partial_subnets.data.aws_route_table.peer_subnet_rts[0],
Terraform code that produces the error:
module "partial_subnets" {
source = "../../"
#version = "6.0.0"
providers = {
aws.this = aws.this
aws.peer = aws.peer
}
this_vpc_id = var.this_vpc_id
peer_vpc_id = var.peer_vpc_id
auto_accept_peering = true
peer_dns_resolution = true
this_dns_resolution = true
peer_subnets_ids = ["subnet-unassociated-with-any-rt", "subnet-associated-with-rt-x"]
this_subnets_ids = var.this_subnets_ids
this_rts_ids = var.this_rts_ids
peer_rts_ids = ["peer_main_rt", "peer_rt-x"]
tags = {
Name = "tf-partial-subnets"
Environment = "Test"
}
}
Additional context
Will provide a fix via PR
Reactions are currently unavailable