question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

cdktf_cdktf_provider_aws.vpc.RouteTableRoute requires core_network_arn

See original GitHub issue

Community Note

  • Please vote on this issue by adding a šŸ‘ reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave ā€œ+1ā€ or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

cdktf & Language Versions

Python 3.9.7 cdktf==0.10.1 cdktf-cdktf-provider-aws==7.0.15

Affected Resource(s)

route = _vpc.RouteTableRoute(
    cidr_block="0.0.0.0/0",
    gateway_id=igw.id,
)

route_table = _vpc.RouteTable(
    self, 
    f"{self.env}Route_{key}",
    vpc_id=net.id,
    route=[route]
)

Debug Output

Gist

Expected Behavior

Able to perform cdktf plan and apply without this error.

Actual Behavior

When I run cdktf plan or apply with the noted configuration, the error will be thrown.

Steps to Reproduce

Please refer to the comment of the gist

Important Factoids

It appears that I can work around the error by passing in an empty string to RouteTableRoute

route = _vpc.RouteTableRoute(
                cidr_block="0.0.0.0/0",
                gateway_id=igw.id,
                core_network_arn=""
            )

References

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
wuntuskcommented, Apr 26, 2022

This is a bug that has appeared in the past with RouteTableRoute. I submitted a pull request last July when the exact same thing happened when cidr_block and carrier_gateway_id were added.

in @cdktf/provider-aws/lib/vpc/route-table.js at line 15 you can see the offending code thatā€™s been added:

`
carrier_gateway_id: struct.carrierGatewayId === undefined ? null : cdktf.stringToTerraform(struct.carrierGatewayId),

cidr_block: struct.cidrBlock === undefined ? null : cdktf.stringToTerraform(struct.cidrBlock),

core_network_arn: cdktf.stringToTerraform(struct.coreNetworkArn),

destination_prefix_list_id: struct.destinationPrefixListId === undefined ? null : cdktf.stringToTerraform(struct.destinationPrefixListId),

egress_only_gateway_id: struct.egressOnlyGatewayId === undefined ? null : cdktf.stringToTerraform(struct.egressOnlyGatewayId), `

Notice how all the variables set null if theyā€™re undefined other than the newly added ā€œcore_network_arnā€ which just doesnā€™t set anything if itā€™s undefined. That value HAS to be set null if itā€™s undefined

0reactions
github-actions[bot]commented, Nov 27, 2022

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ā€™ve 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure route tables - Amazon Virtual Private Cloud
Main route tableā€”The route table that automatically comes with your VPC. ... This means that you don't need to manually enter VPN routes...
Read more >
routetable - Go Packages
When a project reaches major version v1 it is considered stable. Learn more. Repository. github.com/cdktf/cdktf-provider-aws-go. Links.
Read more >
aws_route_table | Resources | hashicorp/aws
Provides a resource to create a VPC routing table. ... cidr_block - (Required) The CIDR block of the route. ipv6_cidr_block - (Optional) The...
Read more >
create-route-table ā€” AWS CLI 2.9.7 Command Reference
If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation . --vpc-id (string). The ID ofĀ ...
Read more >
aws.ec2.DefaultRouteTable - Pulumi
This step is required so that only the routes specified in the configuration exist in the default route table. For more information, see...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found