1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. CcnAttachment
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.CcnAttachment

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a CCN attaching resource.

    Example Usage

    Only Attachment instance

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const config = new pulumi.Config();
    const region = config.get("region") || "ap-guangzhou";
    const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
    const otherUin = config.get("otherUin") || "100031344528";
    const otherCcn = config.get("otherCcn") || "ccn-qhgojahx";
    // create vpc
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "172.16.0.0/16"});
    // create subnet
    const subnet = new tencentcloud.Subnet("subnet", {
        availabilityZone: availabilityZone,
        vpcId: vpc.vpcId,
        cidrBlock: "172.16.0.0/24",
        isMulticast: false,
    });
    // create ccn
    const example = new tencentcloud.Ccn("example", {
        description: "desc.",
        qos: "AG",
        chargeType: "PREPAID",
        bandwidthLimitType: "INTER_REGION_LIMIT",
        tags: {
            createBy: "terraform",
        },
    });
    // attachment instance
    const attachment = new tencentcloud.CcnAttachment("attachment", {
        ccnId: example.ccnId,
        instanceId: vpc.vpcId,
        instanceType: "VPC",
        instanceRegion: region,
    });
    // attachment other instance
    const otherAccount = new tencentcloud.CcnAttachment("otherAccount", {
        ccnId: otherCcn,
        instanceId: vpc.vpcId,
        instanceType: "VPC",
        instanceRegion: region,
        ccnUin: otherUin,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    config = pulumi.Config()
    region = config.get("region")
    if region is None:
        region = "ap-guangzhou"
    availability_zone = config.get("availabilityZone")
    if availability_zone is None:
        availability_zone = "ap-guangzhou-4"
    other_uin = config.get("otherUin")
    if other_uin is None:
        other_uin = "100031344528"
    other_ccn = config.get("otherCcn")
    if other_ccn is None:
        other_ccn = "ccn-qhgojahx"
    # create vpc
    vpc = tencentcloud.Vpc("vpc", cidr_block="172.16.0.0/16")
    # create subnet
    subnet = tencentcloud.Subnet("subnet",
        availability_zone=availability_zone,
        vpc_id=vpc.vpc_id,
        cidr_block="172.16.0.0/24",
        is_multicast=False)
    # create ccn
    example = tencentcloud.Ccn("example",
        description="desc.",
        qos="AG",
        charge_type="PREPAID",
        bandwidth_limit_type="INTER_REGION_LIMIT",
        tags={
            "createBy": "terraform",
        })
    # attachment instance
    attachment = tencentcloud.CcnAttachment("attachment",
        ccn_id=example.ccn_id,
        instance_id=vpc.vpc_id,
        instance_type="VPC",
        instance_region=region)
    # attachment other instance
    other_account = tencentcloud.CcnAttachment("otherAccount",
        ccn_id=other_ccn,
        instance_id=vpc.vpc_id,
        instance_type="VPC",
        instance_region=region,
        ccn_uin=other_uin)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		region := "ap-guangzhou"
    		if param := cfg.Get("region"); param != "" {
    			region = param
    		}
    		availabilityZone := "ap-guangzhou-4"
    		if param := cfg.Get("availabilityZone"); param != "" {
    			availabilityZone = param
    		}
    		otherUin := "100031344528"
    		if param := cfg.Get("otherUin"); param != "" {
    			otherUin = param
    		}
    		otherCcn := "ccn-qhgojahx"
    		if param := cfg.Get("otherCcn"); param != "" {
    			otherCcn = param
    		}
    		// create vpc
    		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		// create subnet
    		_, err = tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
    			AvailabilityZone: pulumi.String(availabilityZone),
    			VpcId:            vpc.VpcId,
    			CidrBlock:        pulumi.String("172.16.0.0/24"),
    			IsMulticast:      pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		// create ccn
    		example, err := tencentcloud.NewCcn(ctx, "example", &tencentcloud.CcnArgs{
    			Description:        pulumi.String("desc."),
    			Qos:                pulumi.String("AG"),
    			ChargeType:         pulumi.String("PREPAID"),
    			BandwidthLimitType: pulumi.String("INTER_REGION_LIMIT"),
    			Tags: pulumi.StringMap{
    				"createBy": pulumi.String("terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// attachment instance
    		_, err = tencentcloud.NewCcnAttachment(ctx, "attachment", &tencentcloud.CcnAttachmentArgs{
    			CcnId:          example.CcnId,
    			InstanceId:     vpc.VpcId,
    			InstanceType:   pulumi.String("VPC"),
    			InstanceRegion: pulumi.String(region),
    		})
    		if err != nil {
    			return err
    		}
    		// attachment other instance
    		_, err = tencentcloud.NewCcnAttachment(ctx, "otherAccount", &tencentcloud.CcnAttachmentArgs{
    			CcnId:          pulumi.String(otherCcn),
    			InstanceId:     vpc.VpcId,
    			InstanceType:   pulumi.String("VPC"),
    			InstanceRegion: pulumi.String(region),
    			CcnUin:         pulumi.String(otherUin),
    		})
    		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 config = new Config();
        var region = config.Get("region") ?? "ap-guangzhou";
        var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
        var otherUin = config.Get("otherUin") ?? "100031344528";
        var otherCcn = config.Get("otherCcn") ?? "ccn-qhgojahx";
        // create vpc
        var vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "172.16.0.0/16",
        });
    
        // create subnet
        var subnet = new Tencentcloud.Subnet("subnet", new()
        {
            AvailabilityZone = availabilityZone,
            VpcId = vpc.VpcId,
            CidrBlock = "172.16.0.0/24",
            IsMulticast = false,
        });
    
        // create ccn
        var example = new Tencentcloud.Ccn("example", new()
        {
            Description = "desc.",
            Qos = "AG",
            ChargeType = "PREPAID",
            BandwidthLimitType = "INTER_REGION_LIMIT",
            Tags = 
            {
                { "createBy", "terraform" },
            },
        });
    
        // attachment instance
        var attachment = new Tencentcloud.CcnAttachment("attachment", new()
        {
            CcnId = example.CcnId,
            InstanceId = vpc.VpcId,
            InstanceType = "VPC",
            InstanceRegion = region,
        });
    
        // attachment other instance
        var otherAccount = new Tencentcloud.CcnAttachment("otherAccount", new()
        {
            CcnId = otherCcn,
            InstanceId = vpc.VpcId,
            InstanceType = "VPC",
            InstanceRegion = region,
            CcnUin = otherUin,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.Subnet;
    import com.pulumi.tencentcloud.SubnetArgs;
    import com.pulumi.tencentcloud.Ccn;
    import com.pulumi.tencentcloud.CcnArgs;
    import com.pulumi.tencentcloud.CcnAttachment;
    import com.pulumi.tencentcloud.CcnAttachmentArgs;
    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) {
            final var config = ctx.config();
            final var region = config.get("region").orElse("ap-guangzhou");
            final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
            final var otherUin = config.get("otherUin").orElse("100031344528");
            final var otherCcn = config.get("otherCcn").orElse("ccn-qhgojahx");
            // create vpc
            var vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("172.16.0.0/16")
                .build());
    
            // create subnet
            var subnet = new Subnet("subnet", SubnetArgs.builder()
                .availabilityZone(availabilityZone)
                .vpcId(vpc.vpcId())
                .cidrBlock("172.16.0.0/24")
                .isMulticast(false)
                .build());
    
            // create ccn
            var example = new Ccn("example", CcnArgs.builder()
                .description("desc.")
                .qos("AG")
                .chargeType("PREPAID")
                .bandwidthLimitType("INTER_REGION_LIMIT")
                .tags(Map.of("createBy", "terraform"))
                .build());
    
            // attachment instance
            var attachment = new CcnAttachment("attachment", CcnAttachmentArgs.builder()
                .ccnId(example.ccnId())
                .instanceId(vpc.vpcId())
                .instanceType("VPC")
                .instanceRegion(region)
                .build());
    
            // attachment other instance
            var otherAccount = new CcnAttachment("otherAccount", CcnAttachmentArgs.builder()
                .ccnId(otherCcn)
                .instanceId(vpc.vpcId())
                .instanceType("VPC")
                .instanceRegion(region)
                .ccnUin(otherUin)
                .build());
    
        }
    }
    
    configuration:
      region:
        type: string
        default: ap-guangzhou
      availabilityZone:
        type: string
        default: ap-guangzhou-4
      otherUin:
        type: string
        default: '100031344528'
      otherCcn:
        type: string
        default: ccn-qhgojahx
    resources:
      # create vpc
      vpc:
        type: tencentcloud:Vpc
        properties:
          cidrBlock: 172.16.0.0/16
      # create subnet
      subnet:
        type: tencentcloud:Subnet
        properties:
          availabilityZone: ${availabilityZone}
          vpcId: ${vpc.vpcId}
          cidrBlock: 172.16.0.0/24
          isMulticast: false
      # create ccn
      example:
        type: tencentcloud:Ccn
        properties:
          description: desc.
          qos: AG
          chargeType: PREPAID
          bandwidthLimitType: INTER_REGION_LIMIT
          tags:
            createBy: terraform
      # attachment instance
      attachment:
        type: tencentcloud:CcnAttachment
        properties:
          ccnId: ${example.ccnId}
          instanceId: ${vpc.vpcId}
          instanceType: VPC
          instanceRegion: ${region}
      # attachment other instance
      otherAccount:
        type: tencentcloud:CcnAttachment
        properties:
          ccnId: ${otherCcn}
          instanceId: ${vpc.vpcId}
          instanceType: VPC
          instanceRegion: ${region}
          ccnUin: ${otherUin}
    

    Attachment instance & route table

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const config = new pulumi.Config();
    const region = config.get("region") || "ap-guangzhou";
    const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
    // create vpc
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "172.16.0.0/16"});
    // create subnet
    const subnet = new tencentcloud.Subnet("subnet", {
        availabilityZone: availabilityZone,
        vpcId: vpc.vpcId,
        cidrBlock: "172.16.0.0/24",
        isMulticast: false,
    });
    // create ccn
    const exampleCcn = new tencentcloud.Ccn("exampleCcn", {
        description: "desc.",
        qos: "AG",
        chargeType: "PREPAID",
        bandwidthLimitType: "INTER_REGION_LIMIT",
        tags: {
            createBy: "terraform",
        },
    });
    // create ccn route table
    const exampleCcnRouteTable = new tencentcloud.CcnRouteTable("exampleCcnRouteTable", {
        ccnId: exampleCcn.ccnId,
        description: "desc.",
    });
    // attachment instance & route table
    const attachment = new tencentcloud.CcnAttachment("attachment", {
        ccnId: exampleCcn.ccnId,
        instanceId: vpc.vpcId,
        instanceType: "VPC",
        instanceRegion: region,
        routeTableId: exampleCcnRouteTable.ccnRouteTableId,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    config = pulumi.Config()
    region = config.get("region")
    if region is None:
        region = "ap-guangzhou"
    availability_zone = config.get("availabilityZone")
    if availability_zone is None:
        availability_zone = "ap-guangzhou-4"
    # create vpc
    vpc = tencentcloud.Vpc("vpc", cidr_block="172.16.0.0/16")
    # create subnet
    subnet = tencentcloud.Subnet("subnet",
        availability_zone=availability_zone,
        vpc_id=vpc.vpc_id,
        cidr_block="172.16.0.0/24",
        is_multicast=False)
    # create ccn
    example_ccn = tencentcloud.Ccn("exampleCcn",
        description="desc.",
        qos="AG",
        charge_type="PREPAID",
        bandwidth_limit_type="INTER_REGION_LIMIT",
        tags={
            "createBy": "terraform",
        })
    # create ccn route table
    example_ccn_route_table = tencentcloud.CcnRouteTable("exampleCcnRouteTable",
        ccn_id=example_ccn.ccn_id,
        description="desc.")
    # attachment instance & route table
    attachment = tencentcloud.CcnAttachment("attachment",
        ccn_id=example_ccn.ccn_id,
        instance_id=vpc.vpc_id,
        instance_type="VPC",
        instance_region=region,
        route_table_id=example_ccn_route_table.ccn_route_table_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		region := "ap-guangzhou"
    		if param := cfg.Get("region"); param != "" {
    			region = param
    		}
    		availabilityZone := "ap-guangzhou-4"
    		if param := cfg.Get("availabilityZone"); param != "" {
    			availabilityZone = param
    		}
    		// create vpc
    		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		// create subnet
    		_, err = tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
    			AvailabilityZone: pulumi.String(availabilityZone),
    			VpcId:            vpc.VpcId,
    			CidrBlock:        pulumi.String("172.16.0.0/24"),
    			IsMulticast:      pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		// create ccn
    		exampleCcn, err := tencentcloud.NewCcn(ctx, "exampleCcn", &tencentcloud.CcnArgs{
    			Description:        pulumi.String("desc."),
    			Qos:                pulumi.String("AG"),
    			ChargeType:         pulumi.String("PREPAID"),
    			BandwidthLimitType: pulumi.String("INTER_REGION_LIMIT"),
    			Tags: pulumi.StringMap{
    				"createBy": pulumi.String("terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// create ccn route table
    		exampleCcnRouteTable, err := tencentcloud.NewCcnRouteTable(ctx, "exampleCcnRouteTable", &tencentcloud.CcnRouteTableArgs{
    			CcnId:       exampleCcn.CcnId,
    			Description: pulumi.String("desc."),
    		})
    		if err != nil {
    			return err
    		}
    		// attachment instance & route table
    		_, err = tencentcloud.NewCcnAttachment(ctx, "attachment", &tencentcloud.CcnAttachmentArgs{
    			CcnId:          exampleCcn.CcnId,
    			InstanceId:     vpc.VpcId,
    			InstanceType:   pulumi.String("VPC"),
    			InstanceRegion: pulumi.String(region),
    			RouteTableId:   exampleCcnRouteTable.CcnRouteTableId,
    		})
    		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 config = new Config();
        var region = config.Get("region") ?? "ap-guangzhou";
        var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
        // create vpc
        var vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "172.16.0.0/16",
        });
    
        // create subnet
        var subnet = new Tencentcloud.Subnet("subnet", new()
        {
            AvailabilityZone = availabilityZone,
            VpcId = vpc.VpcId,
            CidrBlock = "172.16.0.0/24",
            IsMulticast = false,
        });
    
        // create ccn
        var exampleCcn = new Tencentcloud.Ccn("exampleCcn", new()
        {
            Description = "desc.",
            Qos = "AG",
            ChargeType = "PREPAID",
            BandwidthLimitType = "INTER_REGION_LIMIT",
            Tags = 
            {
                { "createBy", "terraform" },
            },
        });
    
        // create ccn route table
        var exampleCcnRouteTable = new Tencentcloud.CcnRouteTable("exampleCcnRouteTable", new()
        {
            CcnId = exampleCcn.CcnId,
            Description = "desc.",
        });
    
        // attachment instance & route table
        var attachment = new Tencentcloud.CcnAttachment("attachment", new()
        {
            CcnId = exampleCcn.CcnId,
            InstanceId = vpc.VpcId,
            InstanceType = "VPC",
            InstanceRegion = region,
            RouteTableId = exampleCcnRouteTable.CcnRouteTableId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.Subnet;
    import com.pulumi.tencentcloud.SubnetArgs;
    import com.pulumi.tencentcloud.Ccn;
    import com.pulumi.tencentcloud.CcnArgs;
    import com.pulumi.tencentcloud.CcnRouteTable;
    import com.pulumi.tencentcloud.CcnRouteTableArgs;
    import com.pulumi.tencentcloud.CcnAttachment;
    import com.pulumi.tencentcloud.CcnAttachmentArgs;
    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) {
            final var config = ctx.config();
            final var region = config.get("region").orElse("ap-guangzhou");
            final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
            // create vpc
            var vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("172.16.0.0/16")
                .build());
    
            // create subnet
            var subnet = new Subnet("subnet", SubnetArgs.builder()
                .availabilityZone(availabilityZone)
                .vpcId(vpc.vpcId())
                .cidrBlock("172.16.0.0/24")
                .isMulticast(false)
                .build());
    
            // create ccn
            var exampleCcn = new Ccn("exampleCcn", CcnArgs.builder()
                .description("desc.")
                .qos("AG")
                .chargeType("PREPAID")
                .bandwidthLimitType("INTER_REGION_LIMIT")
                .tags(Map.of("createBy", "terraform"))
                .build());
    
            // create ccn route table
            var exampleCcnRouteTable = new CcnRouteTable("exampleCcnRouteTable", CcnRouteTableArgs.builder()
                .ccnId(exampleCcn.ccnId())
                .description("desc.")
                .build());
    
            // attachment instance & route table
            var attachment = new CcnAttachment("attachment", CcnAttachmentArgs.builder()
                .ccnId(exampleCcn.ccnId())
                .instanceId(vpc.vpcId())
                .instanceType("VPC")
                .instanceRegion(region)
                .routeTableId(exampleCcnRouteTable.ccnRouteTableId())
                .build());
    
        }
    }
    
    configuration:
      region:
        type: string
        default: ap-guangzhou
      availabilityZone:
        type: string
        default: ap-guangzhou-4
    resources:
      # create vpc
      vpc:
        type: tencentcloud:Vpc
        properties:
          cidrBlock: 172.16.0.0/16
      # create subnet
      subnet:
        type: tencentcloud:Subnet
        properties:
          availabilityZone: ${availabilityZone}
          vpcId: ${vpc.vpcId}
          cidrBlock: 172.16.0.0/24
          isMulticast: false
      # create ccn
      exampleCcn:
        type: tencentcloud:Ccn
        properties:
          description: desc.
          qos: AG
          chargeType: PREPAID
          bandwidthLimitType: INTER_REGION_LIMIT
          tags:
            createBy: terraform
      # create ccn route table
      exampleCcnRouteTable:
        type: tencentcloud:CcnRouteTable
        properties:
          ccnId: ${exampleCcn.ccnId}
          description: desc.
      # attachment instance & route table
      attachment:
        type: tencentcloud:CcnAttachment
        properties:
          ccnId: ${exampleCcn.ccnId}
          instanceId: ${vpc.vpcId}
          instanceType: VPC
          instanceRegion: ${region}
          routeTableId: ${exampleCcnRouteTable.ccnRouteTableId}
    

    Create CcnAttachment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CcnAttachment(name: string, args: CcnAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def CcnAttachment(resource_name: str,
                      args: CcnAttachmentArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def CcnAttachment(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      ccn_id: Optional[str] = None,
                      instance_id: Optional[str] = None,
                      instance_region: Optional[str] = None,
                      instance_type: Optional[str] = None,
                      ccn_attachment_id: Optional[str] = None,
                      ccn_uin: Optional[str] = None,
                      description: Optional[str] = None,
                      route_table_id: Optional[str] = None)
    func NewCcnAttachment(ctx *Context, name string, args CcnAttachmentArgs, opts ...ResourceOption) (*CcnAttachment, error)
    public CcnAttachment(string name, CcnAttachmentArgs args, CustomResourceOptions? opts = null)
    public CcnAttachment(String name, CcnAttachmentArgs args)
    public CcnAttachment(String name, CcnAttachmentArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CcnAttachment
    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 CcnAttachmentArgs
    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 CcnAttachmentArgs
    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 CcnAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CcnAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CcnAttachmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    CcnAttachment 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 CcnAttachment resource accepts the following input properties:

    CcnId string
    ID of the CCN.
    InstanceId string
    ID of instance is attached.
    InstanceRegion string
    The region that the instance locates at.
    InstanceType string
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW. Note: VPNGW type is only for whitelist customer now.
    CcnAttachmentId string
    ID of the resource.
    CcnUin string
    Uin of the ccn attached. If not set, which means the uin of this account. This parameter is used with case when attaching ccn of other account to the instance of this account. For now only support instance type VPC.
    Description string
    Remark of attachment.
    RouteTableId string
    Ccn instance route table ID.
    CcnId string
    ID of the CCN.
    InstanceId string
    ID of instance is attached.
    InstanceRegion string
    The region that the instance locates at.
    InstanceType string
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW. Note: VPNGW type is only for whitelist customer now.
    CcnAttachmentId string
    ID of the resource.
    CcnUin string
    Uin of the ccn attached. If not set, which means the uin of this account. This parameter is used with case when attaching ccn of other account to the instance of this account. For now only support instance type VPC.
    Description string
    Remark of attachment.
    RouteTableId string
    Ccn instance route table ID.
    ccnId String
    ID of the CCN.
    instanceId String
    ID of instance is attached.
    instanceRegion String
    The region that the instance locates at.
    instanceType String
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW. Note: VPNGW type is only for whitelist customer now.
    ccnAttachmentId String
    ID of the resource.
    ccnUin String
    Uin of the ccn attached. If not set, which means the uin of this account. This parameter is used with case when attaching ccn of other account to the instance of this account. For now only support instance type VPC.
    description String
    Remark of attachment.
    routeTableId String
    Ccn instance route table ID.
    ccnId string
    ID of the CCN.
    instanceId string
    ID of instance is attached.
    instanceRegion string
    The region that the instance locates at.
    instanceType string
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW. Note: VPNGW type is only for whitelist customer now.
    ccnAttachmentId string
    ID of the resource.
    ccnUin string
    Uin of the ccn attached. If not set, which means the uin of this account. This parameter is used with case when attaching ccn of other account to the instance of this account. For now only support instance type VPC.
    description string
    Remark of attachment.
    routeTableId string
    Ccn instance route table ID.
    ccn_id str
    ID of the CCN.
    instance_id str
    ID of instance is attached.
    instance_region str
    The region that the instance locates at.
    instance_type str
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW. Note: VPNGW type is only for whitelist customer now.
    ccn_attachment_id str
    ID of the resource.
    ccn_uin str
    Uin of the ccn attached. If not set, which means the uin of this account. This parameter is used with case when attaching ccn of other account to the instance of this account. For now only support instance type VPC.
    description str
    Remark of attachment.
    route_table_id str
    Ccn instance route table ID.
    ccnId String
    ID of the CCN.
    instanceId String
    ID of instance is attached.
    instanceRegion String
    The region that the instance locates at.
    instanceType String
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW. Note: VPNGW type is only for whitelist customer now.
    ccnAttachmentId String
    ID of the resource.
    ccnUin String
    Uin of the ccn attached. If not set, which means the uin of this account. This parameter is used with case when attaching ccn of other account to the instance of this account. For now only support instance type VPC.
    description String
    Remark of attachment.
    routeTableId String
    Ccn instance route table ID.

    Outputs

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

    AttachedTime string
    Time of attaching.
    CidrBlocks List<string>
    A network address block of the instance that is attached.
    Id string
    The provider-assigned unique ID for this managed resource.
    RouteIds List<string>
    Route id list.
    State string
    States of instance is attached. Valid values: PENDING, ACTIVE, EXPIRED, REJECTED, DELETED, FAILED, ATTACHING, DETACHING and DETACHFAILED. FAILED means asynchronous forced disassociation after 2 hours. DETACHFAILED means asynchronous forced disassociation after 2 hours.
    AttachedTime string
    Time of attaching.
    CidrBlocks []string
    A network address block of the instance that is attached.
    Id string
    The provider-assigned unique ID for this managed resource.
    RouteIds []string
    Route id list.
    State string
    States of instance is attached. Valid values: PENDING, ACTIVE, EXPIRED, REJECTED, DELETED, FAILED, ATTACHING, DETACHING and DETACHFAILED. FAILED means asynchronous forced disassociation after 2 hours. DETACHFAILED means asynchronous forced disassociation after 2 hours.
    attachedTime String
    Time of attaching.
    cidrBlocks List<String>
    A network address block of the instance that is attached.
    id String
    The provider-assigned unique ID for this managed resource.
    routeIds List<String>
    Route id list.
    state String
    States of instance is attached. Valid values: PENDING, ACTIVE, EXPIRED, REJECTED, DELETED, FAILED, ATTACHING, DETACHING and DETACHFAILED. FAILED means asynchronous forced disassociation after 2 hours. DETACHFAILED means asynchronous forced disassociation after 2 hours.
    attachedTime string
    Time of attaching.
    cidrBlocks string[]
    A network address block of the instance that is attached.
    id string
    The provider-assigned unique ID for this managed resource.
    routeIds string[]
    Route id list.
    state string
    States of instance is attached. Valid values: PENDING, ACTIVE, EXPIRED, REJECTED, DELETED, FAILED, ATTACHING, DETACHING and DETACHFAILED. FAILED means asynchronous forced disassociation after 2 hours. DETACHFAILED means asynchronous forced disassociation after 2 hours.
    attached_time str
    Time of attaching.
    cidr_blocks Sequence[str]
    A network address block of the instance that is attached.
    id str
    The provider-assigned unique ID for this managed resource.
    route_ids Sequence[str]
    Route id list.
    state str
    States of instance is attached. Valid values: PENDING, ACTIVE, EXPIRED, REJECTED, DELETED, FAILED, ATTACHING, DETACHING and DETACHFAILED. FAILED means asynchronous forced disassociation after 2 hours. DETACHFAILED means asynchronous forced disassociation after 2 hours.
    attachedTime String
    Time of attaching.
    cidrBlocks List<String>
    A network address block of the instance that is attached.
    id String
    The provider-assigned unique ID for this managed resource.
    routeIds List<String>
    Route id list.
    state String
    States of instance is attached. Valid values: PENDING, ACTIVE, EXPIRED, REJECTED, DELETED, FAILED, ATTACHING, DETACHING and DETACHFAILED. FAILED means asynchronous forced disassociation after 2 hours. DETACHFAILED means asynchronous forced disassociation after 2 hours.

    Look up Existing CcnAttachment Resource

    Get an existing CcnAttachment 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?: CcnAttachmentState, opts?: CustomResourceOptions): CcnAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            attached_time: Optional[str] = None,
            ccn_attachment_id: Optional[str] = None,
            ccn_id: Optional[str] = None,
            ccn_uin: Optional[str] = None,
            cidr_blocks: Optional[Sequence[str]] = None,
            description: Optional[str] = None,
            instance_id: Optional[str] = None,
            instance_region: Optional[str] = None,
            instance_type: Optional[str] = None,
            route_ids: Optional[Sequence[str]] = None,
            route_table_id: Optional[str] = None,
            state: Optional[str] = None) -> CcnAttachment
    func GetCcnAttachment(ctx *Context, name string, id IDInput, state *CcnAttachmentState, opts ...ResourceOption) (*CcnAttachment, error)
    public static CcnAttachment Get(string name, Input<string> id, CcnAttachmentState? state, CustomResourceOptions? opts = null)
    public static CcnAttachment get(String name, Output<String> id, CcnAttachmentState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CcnAttachment    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.
    The following state arguments are supported:
    AttachedTime string
    Time of attaching.
    CcnAttachmentId string
    ID of the resource.
    CcnId string
    ID of the CCN.
    CcnUin string
    Uin of the ccn attached. If not set, which means the uin of this account. This parameter is used with case when attaching ccn of other account to the instance of this account. For now only support instance type VPC.
    CidrBlocks List<string>
    A network address block of the instance that is attached.
    Description string
    Remark of attachment.
    InstanceId string
    ID of instance is attached.
    InstanceRegion string
    The region that the instance locates at.
    InstanceType string
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW. Note: VPNGW type is only for whitelist customer now.
    RouteIds List<string>
    Route id list.
    RouteTableId string
    Ccn instance route table ID.
    State string
    States of instance is attached. Valid values: PENDING, ACTIVE, EXPIRED, REJECTED, DELETED, FAILED, ATTACHING, DETACHING and DETACHFAILED. FAILED means asynchronous forced disassociation after 2 hours. DETACHFAILED means asynchronous forced disassociation after 2 hours.
    AttachedTime string
    Time of attaching.
    CcnAttachmentId string
    ID of the resource.
    CcnId string
    ID of the CCN.
    CcnUin string
    Uin of the ccn attached. If not set, which means the uin of this account. This parameter is used with case when attaching ccn of other account to the instance of this account. For now only support instance type VPC.
    CidrBlocks []string
    A network address block of the instance that is attached.
    Description string
    Remark of attachment.
    InstanceId string
    ID of instance is attached.
    InstanceRegion string
    The region that the instance locates at.
    InstanceType string
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW. Note: VPNGW type is only for whitelist customer now.
    RouteIds []string
    Route id list.
    RouteTableId string
    Ccn instance route table ID.
    State string
    States of instance is attached. Valid values: PENDING, ACTIVE, EXPIRED, REJECTED, DELETED, FAILED, ATTACHING, DETACHING and DETACHFAILED. FAILED means asynchronous forced disassociation after 2 hours. DETACHFAILED means asynchronous forced disassociation after 2 hours.
    attachedTime String
    Time of attaching.
    ccnAttachmentId String
    ID of the resource.
    ccnId String
    ID of the CCN.
    ccnUin String
    Uin of the ccn attached. If not set, which means the uin of this account. This parameter is used with case when attaching ccn of other account to the instance of this account. For now only support instance type VPC.
    cidrBlocks List<String>
    A network address block of the instance that is attached.
    description String
    Remark of attachment.
    instanceId String
    ID of instance is attached.
    instanceRegion String
    The region that the instance locates at.
    instanceType String
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW. Note: VPNGW type is only for whitelist customer now.
    routeIds List<String>
    Route id list.
    routeTableId String
    Ccn instance route table ID.
    state String
    States of instance is attached. Valid values: PENDING, ACTIVE, EXPIRED, REJECTED, DELETED, FAILED, ATTACHING, DETACHING and DETACHFAILED. FAILED means asynchronous forced disassociation after 2 hours. DETACHFAILED means asynchronous forced disassociation after 2 hours.
    attachedTime string
    Time of attaching.
    ccnAttachmentId string
    ID of the resource.
    ccnId string
    ID of the CCN.
    ccnUin string
    Uin of the ccn attached. If not set, which means the uin of this account. This parameter is used with case when attaching ccn of other account to the instance of this account. For now only support instance type VPC.
    cidrBlocks string[]
    A network address block of the instance that is attached.
    description string
    Remark of attachment.
    instanceId string
    ID of instance is attached.
    instanceRegion string
    The region that the instance locates at.
    instanceType string
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW. Note: VPNGW type is only for whitelist customer now.
    routeIds string[]
    Route id list.
    routeTableId string
    Ccn instance route table ID.
    state string
    States of instance is attached. Valid values: PENDING, ACTIVE, EXPIRED, REJECTED, DELETED, FAILED, ATTACHING, DETACHING and DETACHFAILED. FAILED means asynchronous forced disassociation after 2 hours. DETACHFAILED means asynchronous forced disassociation after 2 hours.
    attached_time str
    Time of attaching.
    ccn_attachment_id str
    ID of the resource.
    ccn_id str
    ID of the CCN.
    ccn_uin str
    Uin of the ccn attached. If not set, which means the uin of this account. This parameter is used with case when attaching ccn of other account to the instance of this account. For now only support instance type VPC.
    cidr_blocks Sequence[str]
    A network address block of the instance that is attached.
    description str
    Remark of attachment.
    instance_id str
    ID of instance is attached.
    instance_region str
    The region that the instance locates at.
    instance_type str
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW. Note: VPNGW type is only for whitelist customer now.
    route_ids Sequence[str]
    Route id list.
    route_table_id str
    Ccn instance route table ID.
    state str
    States of instance is attached. Valid values: PENDING, ACTIVE, EXPIRED, REJECTED, DELETED, FAILED, ATTACHING, DETACHING and DETACHFAILED. FAILED means asynchronous forced disassociation after 2 hours. DETACHFAILED means asynchronous forced disassociation after 2 hours.
    attachedTime String
    Time of attaching.
    ccnAttachmentId String
    ID of the resource.
    ccnId String
    ID of the CCN.
    ccnUin String
    Uin of the ccn attached. If not set, which means the uin of this account. This parameter is used with case when attaching ccn of other account to the instance of this account. For now only support instance type VPC.
    cidrBlocks List<String>
    A network address block of the instance that is attached.
    description String
    Remark of attachment.
    instanceId String
    ID of instance is attached.
    instanceRegion String
    The region that the instance locates at.
    instanceType String
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW. Note: VPNGW type is only for whitelist customer now.
    routeIds List<String>
    Route id list.
    routeTableId String
    Ccn instance route table ID.
    state String
    States of instance is attached. Valid values: PENDING, ACTIVE, EXPIRED, REJECTED, DELETED, FAILED, ATTACHING, DETACHING and DETACHFAILED. FAILED means asynchronous forced disassociation after 2 hours. DETACHFAILED means asynchronous forced disassociation after 2 hours.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack