cdktf_cdktf_provider_aws.vpc.RouteTableRoute requires core_network_arn
See original GitHub issueCommunity 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
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:
- Created a year ago
- Reactions:2
- Comments:9 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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.