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::VPNConnectionRoute Specifies a static route for a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway. For more information, see [AWS Site-to-Site VPN](https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the *AWS Site-to-Site VPN User Guide*. ## Syntax To declare this entity in your CloudFormation template, use the following syntax: ### JSON ``` { "Type" : "AWS::EC2::VPNConnectionRoute", "Properties" : { "[DestinationCidrBlock](#cfn-ec2-vpnconnectionroute-destinationcidrblock)" : {{String}}, "[VpnConnectionId](#cfn-ec2-vpnconnectionroute-vpnconnectionid)" : {{String}} } } ``` ### YAML ``` Type: AWS::EC2::VPNConnectionRoute Properties: [DestinationCidrBlock](#cfn-ec2-vpnconnectionroute-destinationcidrblock): {{String}} [VpnConnectionId](#cfn-ec2-vpnconnectionroute-vpnconnectionid): {{String}} ``` ## Properties `DestinationCidrBlock` The CIDR block associated with the local subnet of the customer network. *Required*: Yes *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `VpnConnectionId` The ID of the VPN connection. *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 VPN connection 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). ## Examples ### VPN connection route The following example specifies a VPN connection route. #### JSON ``` "MyConnectionRoute0" : { "Type" : "AWS::EC2::VPNConnectionRoute", "Properties" : { "DestinationCidrBlock" : "10.0.0.0/16", "VpnConnectionId" : {"Ref" : "Connection0"} } } ``` #### YAML ``` MyConnectionRoute0: Type: AWS::EC2::VPNConnectionRoute Properties: DestinationCidrBlock: 10.0.0.0/16 VpnConnectionId: !Ref Connection0 ``` ## See also + [CreateVpnConnectionRoute](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVpnConnectionRoute.html) in the *Amazon EC2 API Reference*

AltStyle によって変換されたページ (->オリジナル) /