This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html). # AWS::EC2::TransitGatewayRoute Specifies a static route for a transit gateway route table. ## Syntax To declare this entity in your CloudFormation template, use the following syntax: ### JSON ``` { "Type" : "AWS::EC2::TransitGatewayRoute", "Properties" : { "[Blackhole](#cfn-ec2-transitgatewayroute-blackhole)" : {{Boolean}}, "[DestinationCidrBlock](#cfn-ec2-transitgatewayroute-destinationcidrblock)" : {{String}}, "[TransitGatewayAttachmentId](#cfn-ec2-transitgatewayroute-transitgatewayattachmentid)" : {{String}}, "[TransitGatewayRouteTableId](#cfn-ec2-transitgatewayroute-transitgatewayroutetableid)" : {{String}} } } ``` ### YAML ``` Type: AWS::EC2::TransitGatewayRoute Properties: [Blackhole](#cfn-ec2-transitgatewayroute-blackhole): {{Boolean}} [DestinationCidrBlock](#cfn-ec2-transitgatewayroute-destinationcidrblock): {{String}} [TransitGatewayAttachmentId](#cfn-ec2-transitgatewayroute-transitgatewayattachmentid): {{String}} [TransitGatewayRouteTableId](#cfn-ec2-transitgatewayroute-transitgatewayroutetableid): {{String}} ``` ## Properties `Blackhole` Indicates whether to drop traffic that matches this route. *Required*: No *Type*: Boolean *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `DestinationCidrBlock` The CIDR block used for destination matches. *Required*: Yes *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `TransitGatewayAttachmentId` The ID of the attachment. *Required*: No *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `TransitGatewayRouteTableId` The ID of the transit gateway route table. *Required*: Yes *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) ## Return values ### Ref When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the transit gateway route. For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html). ## See also + [CreateTransitGatewayRoute](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTransitGatewayRoute.html) in the *Amazon EC2 API Reference*