tencentcloud.VpnGatewayRoute
Explore with Pulumi AI
Provides a resource to create a VPN gateway route.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const route = new tencentcloud.VpnGatewayRoute("route", {
destinationCidrBlock: "10.0.0.0/16",
instanceId: "vpnx-5b5dmao3",
instanceType: "VPNCONN",
priority: 100,
status: "DISABLE",
vpnGatewayId: "vpngw-ak9sjem2",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
route = tencentcloud.VpnGatewayRoute("route",
destination_cidr_block="10.0.0.0/16",
instance_id="vpnx-5b5dmao3",
instance_type="VPNCONN",
priority=100,
status="DISABLE",
vpn_gateway_id="vpngw-ak9sjem2")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewVpnGatewayRoute(ctx, "route", &tencentcloud.VpnGatewayRouteArgs{
DestinationCidrBlock: pulumi.String("10.0.0.0/16"),
InstanceId: pulumi.String("vpnx-5b5dmao3"),
InstanceType: pulumi.String("VPNCONN"),
Priority: pulumi.Float64(100),
Status: pulumi.String("DISABLE"),
VpnGatewayId: pulumi.String("vpngw-ak9sjem2"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var route = new Tencentcloud.VpnGatewayRoute("route", new()
{
DestinationCidrBlock = "10.0.0.0/16",
InstanceId = "vpnx-5b5dmao3",
InstanceType = "VPNCONN",
Priority = 100,
Status = "DISABLE",
VpnGatewayId = "vpngw-ak9sjem2",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.VpnGatewayRoute;
import com.pulumi.tencentcloud.VpnGatewayRouteArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var route = new VpnGatewayRoute("route", VpnGatewayRouteArgs.builder()
.destinationCidrBlock("10.0.0.0/16")
.instanceId("vpnx-5b5dmao3")
.instanceType("VPNCONN")
.priority(100)
.status("DISABLE")
.vpnGatewayId("vpngw-ak9sjem2")
.build());
}
}
resources:
route:
type: tencentcloud:VpnGatewayRoute
properties:
destinationCidrBlock: 10.0.0.0/16
instanceId: vpnx-5b5dmao3
instanceType: VPNCONN
priority: 100
status: DISABLE
vpnGatewayId: vpngw-ak9sjem2
Create VpnGatewayRoute Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpnGatewayRoute(name: string, args: VpnGatewayRouteArgs, opts?: CustomResourceOptions);
@overload
def VpnGatewayRoute(resource_name: str,
args: VpnGatewayRouteArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VpnGatewayRoute(resource_name: str,
opts: Optional[ResourceOptions] = None,
destination_cidr_block: Optional[str] = None,
instance_id: Optional[str] = None,
instance_type: Optional[str] = None,
priority: Optional[float] = None,
status: Optional[str] = None,
vpn_gateway_id: Optional[str] = None,
vpn_gateway_route_id: Optional[str] = None)
func NewVpnGatewayRoute(ctx *Context, name string, args VpnGatewayRouteArgs, opts ...ResourceOption) (*VpnGatewayRoute, error)
public VpnGatewayRoute(string name, VpnGatewayRouteArgs args, CustomResourceOptions? opts = null)
public VpnGatewayRoute(String name, VpnGatewayRouteArgs args)
public VpnGatewayRoute(String name, VpnGatewayRouteArgs args, CustomResourceOptions options)
type: tencentcloud:VpnGatewayRoute
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VpnGatewayRouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VpnGatewayRouteArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VpnGatewayRouteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpnGatewayRouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpnGatewayRouteArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
VpnGatewayRoute Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The VpnGatewayRoute resource accepts the following input properties:
- Destination
Cidr stringBlock - Destination IDC IP range.
- Instance
Id string - Instance ID of the next hop.
- Instance
Type string - Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
- Priority double
- Priority. Valid values: 0 and 100.
- Status string
- Status. Valid values: ENABLE and DISABLE.
- Vpn
Gateway stringId - VPN gateway ID.
- Vpn
Gateway stringRoute Id - ID of the resource.
- Destination
Cidr stringBlock - Destination IDC IP range.
- Instance
Id string - Instance ID of the next hop.
- Instance
Type string - Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
- Priority float64
- Priority. Valid values: 0 and 100.
- Status string
- Status. Valid values: ENABLE and DISABLE.
- Vpn
Gateway stringId - VPN gateway ID.
- Vpn
Gateway stringRoute Id - ID of the resource.
- destination
Cidr StringBlock - Destination IDC IP range.
- instance
Id String - Instance ID of the next hop.
- instance
Type String - Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
- priority Double
- Priority. Valid values: 0 and 100.
- status String
- Status. Valid values: ENABLE and DISABLE.
- vpn
Gateway StringId - VPN gateway ID.
- vpn
Gateway StringRoute Id - ID of the resource.
- destination
Cidr stringBlock - Destination IDC IP range.
- instance
Id string - Instance ID of the next hop.
- instance
Type string - Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
- priority number
- Priority. Valid values: 0 and 100.
- status string
- Status. Valid values: ENABLE and DISABLE.
- vpn
Gateway stringId - VPN gateway ID.
- vpn
Gateway stringRoute Id - ID of the resource.
- destination_
cidr_ strblock - Destination IDC IP range.
- instance_
id str - Instance ID of the next hop.
- instance_
type str - Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
- priority float
- Priority. Valid values: 0 and 100.
- status str
- Status. Valid values: ENABLE and DISABLE.
- vpn_
gateway_ strid - VPN gateway ID.
- vpn_
gateway_ strroute_ id - ID of the resource.
- destination
Cidr StringBlock - Destination IDC IP range.
- instance
Id String - Instance ID of the next hop.
- instance
Type String - Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
- priority Number
- Priority. Valid values: 0 and 100.
- status String
- Status. Valid values: ENABLE and DISABLE.
- vpn
Gateway StringId - VPN gateway ID.
- vpn
Gateway StringRoute Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpnGatewayRoute resource produces the following output properties:
- Create
Time string - Create time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Route
Id string - Route ID.
- Type string
- Route type. Default value: Static.
- Update
Time string - Update time.
- Create
Time string - Create time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Route
Id string - Route ID.
- Type string
- Route type. Default value: Static.
- Update
Time string - Update time.
- create
Time String - Create time.
- id String
- The provider-assigned unique ID for this managed resource.
- route
Id String - Route ID.
- type String
- Route type. Default value: Static.
- update
Time String - Update time.
- create
Time string - Create time.
- id string
- The provider-assigned unique ID for this managed resource.
- route
Id string - Route ID.
- type string
- Route type. Default value: Static.
- update
Time string - Update time.
- create_
time str - Create time.
- id str
- The provider-assigned unique ID for this managed resource.
- route_
id str - Route ID.
- type str
- Route type. Default value: Static.
- update_
time str - Update time.
- create
Time String - Create time.
- id String
- The provider-assigned unique ID for this managed resource.
- route
Id String - Route ID.
- type String
- Route type. Default value: Static.
- update
Time String - Update time.
Look up Existing VpnGatewayRoute Resource
Get an existing VpnGatewayRoute resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: VpnGatewayRouteState, opts?: CustomResourceOptions): VpnGatewayRoute
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
destination_cidr_block: Optional[str] = None,
instance_id: Optional[str] = None,
instance_type: Optional[str] = None,
priority: Optional[float] = None,
route_id: Optional[str] = None,
status: Optional[str] = None,
type: Optional[str] = None,
update_time: Optional[str] = None,
vpn_gateway_id: Optional[str] = None,
vpn_gateway_route_id: Optional[str] = None) -> VpnGatewayRoute
func GetVpnGatewayRoute(ctx *Context, name string, id IDInput, state *VpnGatewayRouteState, opts ...ResourceOption) (*VpnGatewayRoute, error)
public static VpnGatewayRoute Get(string name, Input<string> id, VpnGatewayRouteState? state, CustomResourceOptions? opts = null)
public static VpnGatewayRoute get(String name, Output<String> id, VpnGatewayRouteState state, CustomResourceOptions options)
resources: _: type: tencentcloud:VpnGatewayRoute get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Create
Time string - Create time.
- Destination
Cidr stringBlock - Destination IDC IP range.
- Instance
Id string - Instance ID of the next hop.
- Instance
Type string - Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
- Priority double
- Priority. Valid values: 0 and 100.
- Route
Id string - Route ID.
- Status string
- Status. Valid values: ENABLE and DISABLE.
- Type string
- Route type. Default value: Static.
- Update
Time string - Update time.
- Vpn
Gateway stringId - VPN gateway ID.
- Vpn
Gateway stringRoute Id - ID of the resource.
- Create
Time string - Create time.
- Destination
Cidr stringBlock - Destination IDC IP range.
- Instance
Id string - Instance ID of the next hop.
- Instance
Type string - Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
- Priority float64
- Priority. Valid values: 0 and 100.
- Route
Id string - Route ID.
- Status string
- Status. Valid values: ENABLE and DISABLE.
- Type string
- Route type. Default value: Static.
- Update
Time string - Update time.
- Vpn
Gateway stringId - VPN gateway ID.
- Vpn
Gateway stringRoute Id - ID of the resource.
- create
Time String - Create time.
- destination
Cidr StringBlock - Destination IDC IP range.
- instance
Id String - Instance ID of the next hop.
- instance
Type String - Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
- priority Double
- Priority. Valid values: 0 and 100.
- route
Id String - Route ID.
- status String
- Status. Valid values: ENABLE and DISABLE.
- type String
- Route type. Default value: Static.
- update
Time String - Update time.
- vpn
Gateway StringId - VPN gateway ID.
- vpn
Gateway StringRoute Id - ID of the resource.
- create
Time string - Create time.
- destination
Cidr stringBlock - Destination IDC IP range.
- instance
Id string - Instance ID of the next hop.
- instance
Type string - Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
- priority number
- Priority. Valid values: 0 and 100.
- route
Id string - Route ID.
- status string
- Status. Valid values: ENABLE and DISABLE.
- type string
- Route type. Default value: Static.
- update
Time string - Update time.
- vpn
Gateway stringId - VPN gateway ID.
- vpn
Gateway stringRoute Id - ID of the resource.
- create_
time str - Create time.
- destination_
cidr_ strblock - Destination IDC IP range.
- instance_
id str - Instance ID of the next hop.
- instance_
type str - Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
- priority float
- Priority. Valid values: 0 and 100.
- route_
id str - Route ID.
- status str
- Status. Valid values: ENABLE and DISABLE.
- type str
- Route type. Default value: Static.
- update_
time str - Update time.
- vpn_
gateway_ strid - VPN gateway ID.
- vpn_
gateway_ strroute_ id - ID of the resource.
- create
Time String - Create time.
- destination
Cidr StringBlock - Destination IDC IP range.
- instance
Id String - Instance ID of the next hop.
- instance
Type String - Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance).
- priority Number
- Priority. Valid values: 0 and 100.
- route
Id String - Route ID.
- status String
- Status. Valid values: ENABLE and DISABLE.
- type String
- Route type. Default value: Static.
- update
Time String - Update time.
- vpn
Gateway StringId - VPN gateway ID.
- vpn
Gateway StringRoute Id - ID of the resource.
Import
VPN gateway route can be imported using the id, the id format must be ‘{vpn_gateway_id}#{route_id}’, e.g.
$ pulumi import tencentcloud:index/vpnGatewayRoute:VpnGatewayRoute route1 vpngw-ak9sjem2#vpngw-8ccsnclt
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.