tencentcloud.DcGatewayCcnRoute
Explore with Pulumi AI
Provides a resource to creating direct connect gateway route entry.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const main = new tencentcloud.Ccn("main", {
description: "ci-temp-test-ccn-des",
qos: "AG",
});
const ccnMain = new tencentcloud.DcGateway("ccnMain", {
networkInstanceId: main.ccnId,
networkType: "CCN",
gatewayType: "NORMAL",
});
const route1 = new tencentcloud.DcGatewayCcnRoute("route1", {
dcgId: ccnMain.dcGatewayId,
cidrBlock: "10.1.1.0/32",
});
const route2 = new tencentcloud.DcGatewayCcnRoute("route2", {
dcgId: ccnMain.dcGatewayId,
cidrBlock: "192.1.1.0/32",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
main = tencentcloud.Ccn("main",
description="ci-temp-test-ccn-des",
qos="AG")
ccn_main = tencentcloud.DcGateway("ccnMain",
network_instance_id=main.ccn_id,
network_type="CCN",
gateway_type="NORMAL")
route1 = tencentcloud.DcGatewayCcnRoute("route1",
dcg_id=ccn_main.dc_gateway_id,
cidr_block="10.1.1.0/32")
route2 = tencentcloud.DcGatewayCcnRoute("route2",
dcg_id=ccn_main.dc_gateway_id,
cidr_block="192.1.1.0/32")
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 {
main, err := tencentcloud.NewCcn(ctx, "main", &tencentcloud.CcnArgs{
Description: pulumi.String("ci-temp-test-ccn-des"),
Qos: pulumi.String("AG"),
})
if err != nil {
return err
}
ccnMain, err := tencentcloud.NewDcGateway(ctx, "ccnMain", &tencentcloud.DcGatewayArgs{
NetworkInstanceId: main.CcnId,
NetworkType: pulumi.String("CCN"),
GatewayType: pulumi.String("NORMAL"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewDcGatewayCcnRoute(ctx, "route1", &tencentcloud.DcGatewayCcnRouteArgs{
DcgId: ccnMain.DcGatewayId,
CidrBlock: pulumi.String("10.1.1.0/32"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewDcGatewayCcnRoute(ctx, "route2", &tencentcloud.DcGatewayCcnRouteArgs{
DcgId: ccnMain.DcGatewayId,
CidrBlock: pulumi.String("192.1.1.0/32"),
})
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 main = new Tencentcloud.Ccn("main", new()
{
Description = "ci-temp-test-ccn-des",
Qos = "AG",
});
var ccnMain = new Tencentcloud.DcGateway("ccnMain", new()
{
NetworkInstanceId = main.CcnId,
NetworkType = "CCN",
GatewayType = "NORMAL",
});
var route1 = new Tencentcloud.DcGatewayCcnRoute("route1", new()
{
DcgId = ccnMain.DcGatewayId,
CidrBlock = "10.1.1.0/32",
});
var route2 = new Tencentcloud.DcGatewayCcnRoute("route2", new()
{
DcgId = ccnMain.DcGatewayId,
CidrBlock = "192.1.1.0/32",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Ccn;
import com.pulumi.tencentcloud.CcnArgs;
import com.pulumi.tencentcloud.DcGateway;
import com.pulumi.tencentcloud.DcGatewayArgs;
import com.pulumi.tencentcloud.DcGatewayCcnRoute;
import com.pulumi.tencentcloud.DcGatewayCcnRouteArgs;
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 main = new Ccn("main", CcnArgs.builder()
.description("ci-temp-test-ccn-des")
.qos("AG")
.build());
var ccnMain = new DcGateway("ccnMain", DcGatewayArgs.builder()
.networkInstanceId(main.ccnId())
.networkType("CCN")
.gatewayType("NORMAL")
.build());
var route1 = new DcGatewayCcnRoute("route1", DcGatewayCcnRouteArgs.builder()
.dcgId(ccnMain.dcGatewayId())
.cidrBlock("10.1.1.0/32")
.build());
var route2 = new DcGatewayCcnRoute("route2", DcGatewayCcnRouteArgs.builder()
.dcgId(ccnMain.dcGatewayId())
.cidrBlock("192.1.1.0/32")
.build());
}
}
resources:
main:
type: tencentcloud:Ccn
properties:
description: ci-temp-test-ccn-des
qos: AG
ccnMain:
type: tencentcloud:DcGateway
properties:
networkInstanceId: ${main.ccnId}
networkType: CCN
gatewayType: NORMAL
route1:
type: tencentcloud:DcGatewayCcnRoute
properties:
dcgId: ${ccnMain.dcGatewayId}
cidrBlock: 10.1.1.0/32
route2:
type: tencentcloud:DcGatewayCcnRoute
properties:
dcgId: ${ccnMain.dcGatewayId}
cidrBlock: 192.1.1.0/32
Create DcGatewayCcnRoute Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DcGatewayCcnRoute(name: string, args: DcGatewayCcnRouteArgs, opts?: CustomResourceOptions);
@overload
def DcGatewayCcnRoute(resource_name: str,
args: DcGatewayCcnRouteArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DcGatewayCcnRoute(resource_name: str,
opts: Optional[ResourceOptions] = None,
cidr_block: Optional[str] = None,
dcg_id: Optional[str] = None,
dc_gateway_ccn_route_id: Optional[str] = None)
func NewDcGatewayCcnRoute(ctx *Context, name string, args DcGatewayCcnRouteArgs, opts ...ResourceOption) (*DcGatewayCcnRoute, error)
public DcGatewayCcnRoute(string name, DcGatewayCcnRouteArgs args, CustomResourceOptions? opts = null)
public DcGatewayCcnRoute(String name, DcGatewayCcnRouteArgs args)
public DcGatewayCcnRoute(String name, DcGatewayCcnRouteArgs args, CustomResourceOptions options)
type: tencentcloud:DcGatewayCcnRoute
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 DcGatewayCcnRouteArgs
- 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 DcGatewayCcnRouteArgs
- 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 DcGatewayCcnRouteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DcGatewayCcnRouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DcGatewayCcnRouteArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DcGatewayCcnRoute 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 DcGatewayCcnRoute resource accepts the following input properties:
- Cidr
Block string - A network address segment of IDC.
- Dcg
Id string - ID of the DCG.
- Dc
Gateway stringCcn Route Id - ID of the resource.
- Cidr
Block string - A network address segment of IDC.
- Dcg
Id string - ID of the DCG.
- Dc
Gateway stringCcn Route Id - ID of the resource.
- cidr
Block String - A network address segment of IDC.
- dcg
Id String - ID of the DCG.
- dc
Gateway StringCcn Route Id - ID of the resource.
- cidr
Block string - A network address segment of IDC.
- dcg
Id string - ID of the DCG.
- dc
Gateway stringCcn Route Id - ID of the resource.
- cidr_
block str - A network address segment of IDC.
- dcg_
id str - ID of the DCG.
- dc_
gateway_ strccn_ route_ id - ID of the resource.
- cidr
Block String - A network address segment of IDC.
- dcg
Id String - ID of the DCG.
- dc
Gateway StringCcn Route Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the DcGatewayCcnRoute resource produces the following output properties:
Look up Existing DcGatewayCcnRoute Resource
Get an existing DcGatewayCcnRoute 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?: DcGatewayCcnRouteState, opts?: CustomResourceOptions): DcGatewayCcnRoute
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
as_paths: Optional[Sequence[str]] = None,
cidr_block: Optional[str] = None,
dc_gateway_ccn_route_id: Optional[str] = None,
dcg_id: Optional[str] = None) -> DcGatewayCcnRoute
func GetDcGatewayCcnRoute(ctx *Context, name string, id IDInput, state *DcGatewayCcnRouteState, opts ...ResourceOption) (*DcGatewayCcnRoute, error)
public static DcGatewayCcnRoute Get(string name, Input<string> id, DcGatewayCcnRouteState? state, CustomResourceOptions? opts = null)
public static DcGatewayCcnRoute get(String name, Output<String> id, DcGatewayCcnRouteState state, CustomResourceOptions options)
resources: _: type: tencentcloud:DcGatewayCcnRoute 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.
- As
Paths List<string> - As path list of the BGP.
- Cidr
Block string - A network address segment of IDC.
- Dc
Gateway stringCcn Route Id - ID of the resource.
- Dcg
Id string - ID of the DCG.
- As
Paths []string - As path list of the BGP.
- Cidr
Block string - A network address segment of IDC.
- Dc
Gateway stringCcn Route Id - ID of the resource.
- Dcg
Id string - ID of the DCG.
- as
Paths List<String> - As path list of the BGP.
- cidr
Block String - A network address segment of IDC.
- dc
Gateway StringCcn Route Id - ID of the resource.
- dcg
Id String - ID of the DCG.
- as
Paths string[] - As path list of the BGP.
- cidr
Block string - A network address segment of IDC.
- dc
Gateway stringCcn Route Id - ID of the resource.
- dcg
Id string - ID of the DCG.
- as_
paths Sequence[str] - As path list of the BGP.
- cidr_
block str - A network address segment of IDC.
- dc_
gateway_ strccn_ route_ id - ID of the resource.
- dcg_
id str - ID of the DCG.
- as
Paths List<String> - As path list of the BGP.
- cidr
Block String - A network address segment of IDC.
- dc
Gateway StringCcn Route Id - ID of the resource.
- dcg
Id String - ID of the DCG.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.