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.

(aws_ec2): Can't get association_default_route_table_id from CfnTransitGateway

See original GitHub issue

What is the problem?

I can’t reference the association_default_route_table_id attribute from a CfnTransitGateway instance.

Reproduction Steps


[...]

# Create Transit Gateway
my_tgw= aws_ec2.CfnTransitGateway(self, "MyTgw",
    auto_accept_shared_attachments="enable"
)

# Try creating a route by refering to AssociationDefaultRouteTableId 
# ERROR: [...] Requested attribute AssociationDefaultRouteTableId must be a readonly property in schema for AWS::EC2::TransitGateway
route_table_id = my_tgw.get_att("AssociationDefaultRouteTableId").to_string()

route = aws_ec2.CfnTransitGatewayRoute(self, "Route",
    transit_gateway_route_table_id=route_table_id ,
)

What did you expect to happen?

I expected to be able to reference AssociationDefaultRouteTableId without issues.

What actually happened?

I got an error: ERROR: [...] Requested attribute AssociationDefaultRouteTableId must be a readonly property in schema for AWS::EC2::TransitGateway

CDK CLI Version

2.0.0-rc.33

Framework Version

No response

Node.js Version

v16.13.0

OS

Linux

Language

Python

Language Version

Python 3.8.12

Other information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
peterwoodworthcommented, Dec 20, 2021

No problem!

Yes - it seems to me that those would be the best options. I just tried some other options out - but they didn’t end up working

0reactions
github-actions[bot]commented, Dec 21, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

class CfnTransitGateway (construct) · AWS CDK
When you create a transit gateway, we create a default transit gateway route table and use it as the default association route table...
Read more >
TransitGatewayRouteTableId for default ... - Stack Overflow
It is a necessary property for creating a static route in the default transit gateway route table. Type: AWS::EC2::TransitGatewayRoute ...
Read more >
AWS::EC2::TransitGateway - Amazon CloudFormation
Specifies a transit gateway. You can use a transit gateway to interconnect your virtual private clouds (VPC) and on-premises networks. After the transit...
Read more >
Why can't I connect to an Amazon EC2 instance ... - YouTube
We appreciate your feedback: https://amazonintna.qualtrics.com/jfe/form/SV_1FXsYFfkTDc1OQKSkip directly to the demo: 0:24For more details ...
Read more >
How to avoid circular dependency between transit gateway ...
Is there a way to get around this somehow and actually set AssociationDefaultRouteTableId and PropagationDefaultRouteTableId for transit gateway from ...
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