aws-ia / terraform-aws-network-hubandspoke

https://registry.terraform.io/modules/aws-ia/network-hubandspoke/aws
Apache License 2.0
28 stars 10 forks source link

fix: Use prefix in tgw-rtb when using PREFIX in network_definition.type #12

Closed Eagleman7 closed 1 year ago

Eagleman7 commented 1 year ago

When using a prefix list like this:

module "hub-and-spoke" {
  source  = "aws-ia/network-hubandspoke/aws"
  version = "1.0.1"

  ......

  network_definition = {
    type  = "PREFIX_LIST"
    value = aws_ec2_managed_prefix_list.network_prefix_list.id
  }

  .......

The PREFIX list should be attached to the ingress route table to route traffic to the inspection VPC. However both conditions are the same, so it will not use the code to actually attach the prefix to the tgw-rtb.