alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.cen.TransitRouterCidr

Provides a Cloud Enterprise Network (CEN) Transit Router Cidr resource.

For information about Cloud Enterprise Network (CEN) Transit Router Cidr and how to use it, see What is Transit Router Cidr.

NOTE: Available in v1.193.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var defaultInstance = new AliCloud.Cen.Instance("defaultInstance", new()
    {
        CenInstanceName = "tf-example",
    });

    var defaultTransitRouter = new AliCloud.Cen.TransitRouter("defaultTransitRouter", new()
    {
        CenId = defaultInstance.Id,
    });

    var defaultTransitRouterCidr = new AliCloud.Cen.TransitRouterCidr("defaultTransitRouterCidr", new()
    {
        TransitRouterId = defaultTransitRouter.TransitRouterId,
        Cidr = "192.168.0.0/16",
        TransitRouterCidrName = "tf-example-name",
        Description = "tf-example-description",
        PublishCidrRoute = true,
    });

});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultInstance, err := cen.NewInstance(ctx, "defaultInstance", &cen.InstanceArgs{
			CenInstanceName: pulumi.String("tf-example"),
		})
		if err != nil {
			return err
		}
		defaultTransitRouter, err := cen.NewTransitRouter(ctx, "defaultTransitRouter", &cen.TransitRouterArgs{
			CenId: defaultInstance.ID(),
		})
		if err != nil {
			return err
		}
		_, err = cen.NewTransitRouterCidr(ctx, "defaultTransitRouterCidr", &cen.TransitRouterCidrArgs{
			TransitRouterId:       defaultTransitRouter.TransitRouterId,
			Cidr:                  pulumi.String("192.168.0.0/16"),
			TransitRouterCidrName: pulumi.String("tf-example-name"),
			Description:           pulumi.String("tf-example-description"),
			PublishCidrRoute:      pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cen.Instance;
import com.pulumi.alicloud.cen.InstanceArgs;
import com.pulumi.alicloud.cen.TransitRouter;
import com.pulumi.alicloud.cen.TransitRouterArgs;
import com.pulumi.alicloud.cen.TransitRouterCidr;
import com.pulumi.alicloud.cen.TransitRouterCidrArgs;
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 defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()        
            .cenInstanceName("tf-example")
            .build());

        var defaultTransitRouter = new TransitRouter("defaultTransitRouter", TransitRouterArgs.builder()        
            .cenId(defaultInstance.id())
            .build());

        var defaultTransitRouterCidr = new TransitRouterCidr("defaultTransitRouterCidr", TransitRouterCidrArgs.builder()        
            .transitRouterId(defaultTransitRouter.transitRouterId())
            .cidr("192.168.0.0/16")
            .transitRouterCidrName("tf-example-name")
            .description("tf-example-description")
            .publishCidrRoute(true)
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default_instance = alicloud.cen.Instance("defaultInstance", cen_instance_name="tf-example")
default_transit_router = alicloud.cen.TransitRouter("defaultTransitRouter", cen_id=default_instance.id)
default_transit_router_cidr = alicloud.cen.TransitRouterCidr("defaultTransitRouterCidr",
    transit_router_id=default_transit_router.transit_router_id,
    cidr="192.168.0.0/16",
    transit_router_cidr_name="tf-example-name",
    description="tf-example-description",
    publish_cidr_route=True)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultInstance = new alicloud.cen.Instance("defaultInstance", {cenInstanceName: "tf-example"});
const defaultTransitRouter = new alicloud.cen.TransitRouter("defaultTransitRouter", {cenId: defaultInstance.id});
const defaultTransitRouterCidr = new alicloud.cen.TransitRouterCidr("defaultTransitRouterCidr", {
    transitRouterId: defaultTransitRouter.transitRouterId,
    cidr: "192.168.0.0/16",
    transitRouterCidrName: "tf-example-name",
    description: "tf-example-description",
    publishCidrRoute: true,
});
resources:
  defaultInstance:
    type: alicloud:cen:Instance
    properties:
      cenInstanceName: tf-example
  defaultTransitRouter:
    type: alicloud:cen:TransitRouter
    properties:
      cenId: ${defaultInstance.id}
  defaultTransitRouterCidr:
    type: alicloud:cen:TransitRouterCidr
    properties:
      transitRouterId: ${defaultTransitRouter.transitRouterId}
      cidr: 192.168.0.0/16
      transitRouterCidrName: tf-example-name
      description: tf-example-description
      publishCidrRoute: true

Create TransitRouterCidr Resource

new TransitRouterCidr(name: string, args: TransitRouterCidrArgs, opts?: CustomResourceOptions);
@overload
def TransitRouterCidr(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      cidr: Optional[str] = None,
                      description: Optional[str] = None,
                      publish_cidr_route: Optional[bool] = None,
                      transit_router_cidr_name: Optional[str] = None,
                      transit_router_id: Optional[str] = None)
@overload
def TransitRouterCidr(resource_name: str,
                      args: TransitRouterCidrArgs,
                      opts: Optional[ResourceOptions] = None)
func NewTransitRouterCidr(ctx *Context, name string, args TransitRouterCidrArgs, opts ...ResourceOption) (*TransitRouterCidr, error)
public TransitRouterCidr(string name, TransitRouterCidrArgs args, CustomResourceOptions? opts = null)
public TransitRouterCidr(String name, TransitRouterCidrArgs args)
public TransitRouterCidr(String name, TransitRouterCidrArgs args, CustomResourceOptions options)
type: alicloud:cen:TransitRouterCidr
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args TransitRouterCidrArgs
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 TransitRouterCidrArgs
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 TransitRouterCidrArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TransitRouterCidrArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args TransitRouterCidrArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

TransitRouterCidr Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The TransitRouterCidr resource accepts the following input properties:

Cidr string

The cidr of the transit router.

TransitRouterId string

The ID of the transit router.

Description string

The description of the transit router. The description must be 2 to 256 characters in length, and it must start with English letters, but cannot start with http:// or https://.

PublishCidrRoute bool

Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table. Valid values: true and false. Default value: true.

TransitRouterCidrName string

The name of the transit router. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

Cidr string

The cidr of the transit router.

TransitRouterId string

The ID of the transit router.

Description string

The description of the transit router. The description must be 2 to 256 characters in length, and it must start with English letters, but cannot start with http:// or https://.

PublishCidrRoute bool

Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table. Valid values: true and false. Default value: true.

TransitRouterCidrName string

The name of the transit router. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

cidr String

The cidr of the transit router.

transitRouterId String

The ID of the transit router.

description String

The description of the transit router. The description must be 2 to 256 characters in length, and it must start with English letters, but cannot start with http:// or https://.

publishCidrRoute Boolean

Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table. Valid values: true and false. Default value: true.

transitRouterCidrName String

The name of the transit router. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

cidr string

The cidr of the transit router.

transitRouterId string

The ID of the transit router.

description string

The description of the transit router. The description must be 2 to 256 characters in length, and it must start with English letters, but cannot start with http:// or https://.

publishCidrRoute boolean

Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table. Valid values: true and false. Default value: true.

transitRouterCidrName string

The name of the transit router. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

cidr str

The cidr of the transit router.

transit_router_id str

The ID of the transit router.

description str

The description of the transit router. The description must be 2 to 256 characters in length, and it must start with English letters, but cannot start with http:// or https://.

publish_cidr_route bool

Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table. Valid values: true and false. Default value: true.

transit_router_cidr_name str

The name of the transit router. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

cidr String

The cidr of the transit router.

transitRouterId String

The ID of the transit router.

description String

The description of the transit router. The description must be 2 to 256 characters in length, and it must start with English letters, but cannot start with http:// or https://.

publishCidrRoute Boolean

Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table. Valid values: true and false. Default value: true.

transitRouterCidrName String

The name of the transit router. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

Outputs

All input properties are implicitly available as output properties. Additionally, the TransitRouterCidr resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

TransitRouterCidrId string

The ID of the transit router cidr.

Id string

The provider-assigned unique ID for this managed resource.

TransitRouterCidrId string

The ID of the transit router cidr.

id String

The provider-assigned unique ID for this managed resource.

transitRouterCidrId String

The ID of the transit router cidr.

id string

The provider-assigned unique ID for this managed resource.

transitRouterCidrId string

The ID of the transit router cidr.

id str

The provider-assigned unique ID for this managed resource.

transit_router_cidr_id str

The ID of the transit router cidr.

id String

The provider-assigned unique ID for this managed resource.

transitRouterCidrId String

The ID of the transit router cidr.

Look up Existing TransitRouterCidr Resource

Get an existing TransitRouterCidr 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?: TransitRouterCidrState, opts?: CustomResourceOptions): TransitRouterCidr
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cidr: Optional[str] = None,
        description: Optional[str] = None,
        publish_cidr_route: Optional[bool] = None,
        transit_router_cidr_id: Optional[str] = None,
        transit_router_cidr_name: Optional[str] = None,
        transit_router_id: Optional[str] = None) -> TransitRouterCidr
func GetTransitRouterCidr(ctx *Context, name string, id IDInput, state *TransitRouterCidrState, opts ...ResourceOption) (*TransitRouterCidr, error)
public static TransitRouterCidr Get(string name, Input<string> id, TransitRouterCidrState? state, CustomResourceOptions? opts = null)
public static TransitRouterCidr get(String name, Output<String> id, TransitRouterCidrState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
The following state arguments are supported:
Cidr string

The cidr of the transit router.

Description string

The description of the transit router. The description must be 2 to 256 characters in length, and it must start with English letters, but cannot start with http:// or https://.

PublishCidrRoute bool

Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table. Valid values: true and false. Default value: true.

TransitRouterCidrId string

The ID of the transit router cidr.

TransitRouterCidrName string

The name of the transit router. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

TransitRouterId string

The ID of the transit router.

Cidr string

The cidr of the transit router.

Description string

The description of the transit router. The description must be 2 to 256 characters in length, and it must start with English letters, but cannot start with http:// or https://.

PublishCidrRoute bool

Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table. Valid values: true and false. Default value: true.

TransitRouterCidrId string

The ID of the transit router cidr.

TransitRouterCidrName string

The name of the transit router. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

TransitRouterId string

The ID of the transit router.

cidr String

The cidr of the transit router.

description String

The description of the transit router. The description must be 2 to 256 characters in length, and it must start with English letters, but cannot start with http:// or https://.

publishCidrRoute Boolean

Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table. Valid values: true and false. Default value: true.

transitRouterCidrId String

The ID of the transit router cidr.

transitRouterCidrName String

The name of the transit router. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

transitRouterId String

The ID of the transit router.

cidr string

The cidr of the transit router.

description string

The description of the transit router. The description must be 2 to 256 characters in length, and it must start with English letters, but cannot start with http:// or https://.

publishCidrRoute boolean

Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table. Valid values: true and false. Default value: true.

transitRouterCidrId string

The ID of the transit router cidr.

transitRouterCidrName string

The name of the transit router. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

transitRouterId string

The ID of the transit router.

cidr str

The cidr of the transit router.

description str

The description of the transit router. The description must be 2 to 256 characters in length, and it must start with English letters, but cannot start with http:// or https://.

publish_cidr_route bool

Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table. Valid values: true and false. Default value: true.

transit_router_cidr_id str

The ID of the transit router cidr.

transit_router_cidr_name str

The name of the transit router. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

transit_router_id str

The ID of the transit router.

cidr String

The cidr of the transit router.

description String

The description of the transit router. The description must be 2 to 256 characters in length, and it must start with English letters, but cannot start with http:// or https://.

publishCidrRoute Boolean

Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table. Valid values: true and false. Default value: true.

transitRouterCidrId String

The ID of the transit router cidr.

transitRouterCidrName String

The name of the transit router. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

transitRouterId String

The ID of the transit router.

Import

Cloud Enterprise Network (CEN) Transit Router Cidr can be imported using the id, e.g.

 $ pulumi import alicloud:cen/transitRouterCidr:TransitRouterCidr default <transit_router_id>:<transit_router_cidr_id>.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.