Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot create static routes in the same route table as the vpc attachment propagation one #115

Closed
gianluca-ac opened this issue Aug 1, 2023 · 3 comments
Labels

Comments

@gianluca-ac
Copy link

Description

i'm using the tgw module together with the vpc one.
I'm creating a. new tgw enabling default route tables association and default route table propagation.
I addd two static routes, the resulting tgw is created with two route tables, one has the vpc attachment propagation routes and the other has the static routes requested.
The intended configuration is to have both the vpc attachment propagated routes and the static routes in the same routing table (default or otherwise).
my tgw configuration is below:

resource "aws_eip" "apne1-nat" {
count = 2
}

module "apne1-vpc-1" {
source = "terraform-aws-modules/vpc/aws"

name = "apne1-vpc-1"
cidr = "10.0.0.0/16"

azs = ["ap-northeast-1a", "ap-northeast-1d"]
private_subnets = ["10.0.0.0/21", "10.0.8.0/21"]
public_subnets = ["10.0.96.0/21", "10.0.104.0/24"]

enable_nat_gateway = true
single_nat_gateway = false
reuse_nat_ips = true
external_nat_ip_ids = "${aws_eip.apne1-nat.*.id}"
create_igw = true
amazon_side_asn = var.apne1-asn
map_public_ip_on_launch = true

tags = { }
}

module "apne1-tgw-1" {
source = "terraform-aws-modules/transit-gateway/aws"
version = "2.10.0"

name = "apne1-tgw-1"
description = "apne1-tgw-1"

enable_auto_accept_shared_attachments = false
amazon_side_asn = var.apne1-asn #BGP ASN for Tokyo Transit GW
share_tgw = true
ram_allow_external_principals = true
ram_name = "apne1-tgw-1"
ram_principals = []
enable_dns_support = true
enable_multicast_support = true
enable_default_route_table_association = true
enable_default_route_table_propagation = true
transit_gateway_cidr_blocks = ["10.0.255.0/24"]

vpc_attachments = {
vpc = {
vpc_id = module.apne1-vpc-1.vpc_id
subnet_ids = module.apne1-vpc-1.private_subnets
dns_support = true
ipv6_support = false

  tgw_routes = [
    {
      destination_cidr_block = "10.10.0.0/16"
    },
    {
      destination_cidr_block = "10.20.0.0/16"
    }
  ]
}

}

tags = {
Name = "apne1-tgw-1"
}
}

Versions

  • Module version [Required]:
    2.1.0

  • Terraform version:
    terraform cloud v. 1.5.4

  • Provider version(s):

resource "aws_eip" "apne1-nat" {
count = 2
}

module "apne1-vpc-1" {
source = "terraform-aws-modules/vpc/aws"

name = "apne1-vpc-1"
cidr = "10.0.0.0/16"

azs = ["ap-northeast-1a", "ap-northeast-1d"]
private_subnets = ["10.0.0.0/21", "10.0.8.0/21"]
public_subnets = ["10.0.96.0/21", "10.0.104.0/24"]

enable_nat_gateway = true
single_nat_gateway = false
reuse_nat_ips = true
external_nat_ip_ids = "${aws_eip.apne1-nat.*.id}"
create_igw = true
amazon_side_asn = var.apne1-asn
map_public_ip_on_launch = true

tags = { }
}

module "apne1-tgw-1" {
source = "terraform-aws-modules/transit-gateway/aws"
version = "2.10.0"

name = "apne1-tgw-1"
description = "apne1-tgw-1"

enable_auto_accept_shared_attachments = false
amazon_side_asn = var.apne1-asn #BGP ASN for Tokyo Transit GW
share_tgw = true
ram_allow_external_principals = true
ram_name = "apne1-tgw-1"
ram_principals = []
enable_dns_support = true
enable_multicast_support = true
enable_default_route_table_association = true
enable_default_route_table_propagation = true
transit_gateway_cidr_blocks = ["10.0.255.0/24"]

vpc_attachments = {
vpc = {
vpc_id = module.apne1-vpc-1.vpc_id
subnet_ids = module.apne1-vpc-1.private_subnets
dns_support = true
ipv6_support = false

  tgw_routes = [
    {
      destination_cidr_block = "10.10.0.0/16"
    },
    {
      destination_cidr_block = "10.20.0.0/16"
    }
  ]
}

}

tags = {
Name = "apne1-tgw-1"
}
}

Steps to reproduce the behavior:

yes yes i just commit and push the code and then let terraform cloud apply it

Expected behavior

one tgw, one route tables, propagated routes + static routes

Actual behavior

one tgw, two routing tables, one has the propagated routes from the vpc attachments, the other has two static routes

Terminal Output Screenshot(s)

Additional context

@github-actions
Copy link

github-actions bot commented Sep 1, 2023

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale label Sep 1, 2023
@github-actions
Copy link

This issue was automatically closed because of stale in 10 days

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 12, 2023
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant