1. Packages
  2. Volcengine
  3. API Docs
  4. transit_router
  5. DirectConnectGatewayAttachment
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

volcengine.transit_router.DirectConnectGatewayAttachment

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

    Provides a resource to manage transit router direct connect gateway attachment

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var fooTransitRouter = new Volcengine.Transit_router.TransitRouter("fooTransitRouter", new()
        {
            TransitRouterName = "acc-test-tf-acc",
            Description = "acc-test-tf-acc",
        });
    
        var fooGateway = new Volcengine.Direct_connect.Gateway("fooGateway", new()
        {
            DirectConnectGatewayName = "acc-test-gateway-acc",
            Description = "acc-test-acc",
            Tags = new[]
            {
                new Volcengine.Direct_connect.Inputs.GatewayTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
        });
    
        var fooDirectConnectGatewayAttachment = new Volcengine.Transit_router.DirectConnectGatewayAttachment("fooDirectConnectGatewayAttachment", new()
        {
            Description = "acc-test-tf",
            TransitRouterAttachmentName = "acc-test-tf",
            TransitRouterId = fooTransitRouter.Id,
            DirectConnectGatewayId = fooGateway.Id,
            Tags = new[]
            {
                new Volcengine.Transit_router.Inputs.DirectConnectGatewayAttachmentTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/direct_connect"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/transit_router"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooTransitRouter, err := transit_router.NewTransitRouter(ctx, "fooTransitRouter", &transit_router.TransitRouterArgs{
    			TransitRouterName: pulumi.String("acc-test-tf-acc"),
    			Description:       pulumi.String("acc-test-tf-acc"),
    		})
    		if err != nil {
    			return err
    		}
    		fooGateway, err := direct_connect.NewGateway(ctx, "fooGateway", &direct_connect.GatewayArgs{
    			DirectConnectGatewayName: pulumi.String("acc-test-gateway-acc"),
    			Description:              pulumi.String("acc-test-acc"),
    			Tags: direct_connect.GatewayTagArray{
    				&direct_connect.GatewayTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = transit_router.NewDirectConnectGatewayAttachment(ctx, "fooDirectConnectGatewayAttachment", &transit_router.DirectConnectGatewayAttachmentArgs{
    			Description:                 pulumi.String("acc-test-tf"),
    			TransitRouterAttachmentName: pulumi.String("acc-test-tf"),
    			TransitRouterId:             fooTransitRouter.ID(),
    			DirectConnectGatewayId:      fooGateway.ID(),
    			Tags: transit_router.DirectConnectGatewayAttachmentTagArray{
    				&transit_router.DirectConnectGatewayAttachmentTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    		})
    		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.volcengine.transit_router.TransitRouter;
    import com.pulumi.volcengine.transit_router.TransitRouterArgs;
    import com.pulumi.volcengine.direct_connect.Gateway;
    import com.pulumi.volcengine.direct_connect.GatewayArgs;
    import com.pulumi.volcengine.direct_connect.inputs.GatewayTagArgs;
    import com.pulumi.volcengine.transit_router.DirectConnectGatewayAttachment;
    import com.pulumi.volcengine.transit_router.DirectConnectGatewayAttachmentArgs;
    import com.pulumi.volcengine.transit_router.inputs.DirectConnectGatewayAttachmentTagArgs;
    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 fooTransitRouter = new TransitRouter("fooTransitRouter", TransitRouterArgs.builder()        
                .transitRouterName("acc-test-tf-acc")
                .description("acc-test-tf-acc")
                .build());
    
            var fooGateway = new Gateway("fooGateway", GatewayArgs.builder()        
                .directConnectGatewayName("acc-test-gateway-acc")
                .description("acc-test-acc")
                .tags(GatewayTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .build());
    
            var fooDirectConnectGatewayAttachment = new DirectConnectGatewayAttachment("fooDirectConnectGatewayAttachment", DirectConnectGatewayAttachmentArgs.builder()        
                .description("acc-test-tf")
                .transitRouterAttachmentName("acc-test-tf")
                .transitRouterId(fooTransitRouter.id())
                .directConnectGatewayId(fooGateway.id())
                .tags(DirectConnectGatewayAttachmentTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_transit_router = volcengine.transit_router.TransitRouter("fooTransitRouter",
        transit_router_name="acc-test-tf-acc",
        description="acc-test-tf-acc")
    foo_gateway = volcengine.direct_connect.Gateway("fooGateway",
        direct_connect_gateway_name="acc-test-gateway-acc",
        description="acc-test-acc",
        tags=[volcengine.direct_connect.GatewayTagArgs(
            key="k1",
            value="v1",
        )])
    foo_direct_connect_gateway_attachment = volcengine.transit_router.DirectConnectGatewayAttachment("fooDirectConnectGatewayAttachment",
        description="acc-test-tf",
        transit_router_attachment_name="acc-test-tf",
        transit_router_id=foo_transit_router.id,
        direct_connect_gateway_id=foo_gateway.id,
        tags=[volcengine.transit_router.DirectConnectGatewayAttachmentTagArgs(
            key="k1",
            value="v1",
        )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const fooTransitRouter = new volcengine.transit_router.TransitRouter("fooTransitRouter", {
        transitRouterName: "acc-test-tf-acc",
        description: "acc-test-tf-acc",
    });
    const fooGateway = new volcengine.direct_connect.Gateway("fooGateway", {
        directConnectGatewayName: "acc-test-gateway-acc",
        description: "acc-test-acc",
        tags: [{
            key: "k1",
            value: "v1",
        }],
    });
    const fooDirectConnectGatewayAttachment = new volcengine.transit_router.DirectConnectGatewayAttachment("fooDirectConnectGatewayAttachment", {
        description: "acc-test-tf",
        transitRouterAttachmentName: "acc-test-tf",
        transitRouterId: fooTransitRouter.id,
        directConnectGatewayId: fooGateway.id,
        tags: [{
            key: "k1",
            value: "v1",
        }],
    });
    
    resources:
      fooTransitRouter:
        type: volcengine:transit_router:TransitRouter
        properties:
          transitRouterName: acc-test-tf-acc
          description: acc-test-tf-acc
      fooGateway:
        type: volcengine:direct_connect:Gateway
        properties:
          directConnectGatewayName: acc-test-gateway-acc
          description: acc-test-acc
          tags:
            - key: k1
              value: v1
      fooDirectConnectGatewayAttachment:
        type: volcengine:transit_router:DirectConnectGatewayAttachment
        properties:
          description: acc-test-tf
          transitRouterAttachmentName: acc-test-tf
          transitRouterId: ${fooTransitRouter.id}
          directConnectGatewayId: ${fooGateway.id}
          tags:
            - key: k1
              value: v1
    

    Create DirectConnectGatewayAttachment Resource

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

    Constructor syntax

    new DirectConnectGatewayAttachment(name: string, args: DirectConnectGatewayAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def DirectConnectGatewayAttachment(resource_name: str,
                                       args: DirectConnectGatewayAttachmentArgs,
                                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def DirectConnectGatewayAttachment(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       direct_connect_gateway_id: Optional[str] = None,
                                       transit_router_id: Optional[str] = None,
                                       description: Optional[str] = None,
                                       tags: Optional[Sequence[DirectConnectGatewayAttachmentTagArgs]] = None,
                                       transit_router_attachment_name: Optional[str] = None)
    func NewDirectConnectGatewayAttachment(ctx *Context, name string, args DirectConnectGatewayAttachmentArgs, opts ...ResourceOption) (*DirectConnectGatewayAttachment, error)
    public DirectConnectGatewayAttachment(string name, DirectConnectGatewayAttachmentArgs args, CustomResourceOptions? opts = null)
    public DirectConnectGatewayAttachment(String name, DirectConnectGatewayAttachmentArgs args)
    public DirectConnectGatewayAttachment(String name, DirectConnectGatewayAttachmentArgs args, CustomResourceOptions options)
    
    type: volcengine:transit_router:DirectConnectGatewayAttachment
    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 DirectConnectGatewayAttachmentArgs
    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 DirectConnectGatewayAttachmentArgs
    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 DirectConnectGatewayAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DirectConnectGatewayAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DirectConnectGatewayAttachmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var directConnectGatewayAttachmentResource = new Volcengine.Transit_router.DirectConnectGatewayAttachment("directConnectGatewayAttachmentResource", new()
    {
        DirectConnectGatewayId = "string",
        TransitRouterId = "string",
        Description = "string",
        Tags = new[]
        {
            new Volcengine.Transit_router.Inputs.DirectConnectGatewayAttachmentTagArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        TransitRouterAttachmentName = "string",
    });
    
    example, err := transit_router.NewDirectConnectGatewayAttachment(ctx, "directConnectGatewayAttachmentResource", &transit_router.DirectConnectGatewayAttachmentArgs{
    	DirectConnectGatewayId: pulumi.String("string"),
    	TransitRouterId:        pulumi.String("string"),
    	Description:            pulumi.String("string"),
    	Tags: transit_router.DirectConnectGatewayAttachmentTagArray{
    		&transit_router.DirectConnectGatewayAttachmentTagArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	TransitRouterAttachmentName: pulumi.String("string"),
    })
    
    var directConnectGatewayAttachmentResource = new DirectConnectGatewayAttachment("directConnectGatewayAttachmentResource", DirectConnectGatewayAttachmentArgs.builder()
        .directConnectGatewayId("string")
        .transitRouterId("string")
        .description("string")
        .tags(DirectConnectGatewayAttachmentTagArgs.builder()
            .key("string")
            .value("string")
            .build())
        .transitRouterAttachmentName("string")
        .build());
    
    direct_connect_gateway_attachment_resource = volcengine.transit_router.DirectConnectGatewayAttachment("directConnectGatewayAttachmentResource",
        direct_connect_gateway_id="string",
        transit_router_id="string",
        description="string",
        tags=[{
            "key": "string",
            "value": "string",
        }],
        transit_router_attachment_name="string")
    
    const directConnectGatewayAttachmentResource = new volcengine.transit_router.DirectConnectGatewayAttachment("directConnectGatewayAttachmentResource", {
        directConnectGatewayId: "string",
        transitRouterId: "string",
        description: "string",
        tags: [{
            key: "string",
            value: "string",
        }],
        transitRouterAttachmentName: "string",
    });
    
    type: volcengine:transit_router:DirectConnectGatewayAttachment
    properties:
        description: string
        directConnectGatewayId: string
        tags:
            - key: string
              value: string
        transitRouterAttachmentName: string
        transitRouterId: string
    

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

    DirectConnectGatewayId string
    The id of the direct connect gateway.
    TransitRouterId string
    The id of the transit router.
    Description string
    The description.
    Tags List<DirectConnectGatewayAttachmentTag>
    Tags.
    TransitRouterAttachmentName string
    The name of the transit router direct connect gateway attachment.
    DirectConnectGatewayId string
    The id of the direct connect gateway.
    TransitRouterId string
    The id of the transit router.
    Description string
    The description.
    Tags []DirectConnectGatewayAttachmentTagArgs
    Tags.
    TransitRouterAttachmentName string
    The name of the transit router direct connect gateway attachment.
    directConnectGatewayId String
    The id of the direct connect gateway.
    transitRouterId String
    The id of the transit router.
    description String
    The description.
    tags List<DirectConnectGatewayAttachmentTag>
    Tags.
    transitRouterAttachmentName String
    The name of the transit router direct connect gateway attachment.
    directConnectGatewayId string
    The id of the direct connect gateway.
    transitRouterId string
    The id of the transit router.
    description string
    The description.
    tags DirectConnectGatewayAttachmentTag[]
    Tags.
    transitRouterAttachmentName string
    The name of the transit router direct connect gateway attachment.
    direct_connect_gateway_id str
    The id of the direct connect gateway.
    transit_router_id str
    The id of the transit router.
    description str
    The description.
    tags Sequence[DirectConnectGatewayAttachmentTagArgs]
    Tags.
    transit_router_attachment_name str
    The name of the transit router direct connect gateway attachment.
    directConnectGatewayId String
    The id of the direct connect gateway.
    transitRouterId String
    The id of the transit router.
    description String
    The description.
    tags List<Property Map>
    Tags.
    transitRouterAttachmentName String
    The name of the transit router direct connect gateway attachment.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    TransitRouterAttachmentId string
    The id of the transit router direct connect gateway attachment.
    Id string
    The provider-assigned unique ID for this managed resource.
    TransitRouterAttachmentId string
    The id of the transit router direct connect gateway attachment.
    id String
    The provider-assigned unique ID for this managed resource.
    transitRouterAttachmentId String
    The id of the transit router direct connect gateway attachment.
    id string
    The provider-assigned unique ID for this managed resource.
    transitRouterAttachmentId string
    The id of the transit router direct connect gateway attachment.
    id str
    The provider-assigned unique ID for this managed resource.
    transit_router_attachment_id str
    The id of the transit router direct connect gateway attachment.
    id String
    The provider-assigned unique ID for this managed resource.
    transitRouterAttachmentId String
    The id of the transit router direct connect gateway attachment.

    Look up Existing DirectConnectGatewayAttachment Resource

    Get an existing DirectConnectGatewayAttachment 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?: DirectConnectGatewayAttachmentState, opts?: CustomResourceOptions): DirectConnectGatewayAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            direct_connect_gateway_id: Optional[str] = None,
            tags: Optional[Sequence[DirectConnectGatewayAttachmentTagArgs]] = None,
            transit_router_attachment_id: Optional[str] = None,
            transit_router_attachment_name: Optional[str] = None,
            transit_router_id: Optional[str] = None) -> DirectConnectGatewayAttachment
    func GetDirectConnectGatewayAttachment(ctx *Context, name string, id IDInput, state *DirectConnectGatewayAttachmentState, opts ...ResourceOption) (*DirectConnectGatewayAttachment, error)
    public static DirectConnectGatewayAttachment Get(string name, Input<string> id, DirectConnectGatewayAttachmentState? state, CustomResourceOptions? opts = null)
    public static DirectConnectGatewayAttachment get(String name, Output<String> id, DirectConnectGatewayAttachmentState 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:
    Description string
    The description.
    DirectConnectGatewayId string
    The id of the direct connect gateway.
    Tags List<DirectConnectGatewayAttachmentTag>
    Tags.
    TransitRouterAttachmentId string
    The id of the transit router direct connect gateway attachment.
    TransitRouterAttachmentName string
    The name of the transit router direct connect gateway attachment.
    TransitRouterId string
    The id of the transit router.
    Description string
    The description.
    DirectConnectGatewayId string
    The id of the direct connect gateway.
    Tags []DirectConnectGatewayAttachmentTagArgs
    Tags.
    TransitRouterAttachmentId string
    The id of the transit router direct connect gateway attachment.
    TransitRouterAttachmentName string
    The name of the transit router direct connect gateway attachment.
    TransitRouterId string
    The id of the transit router.
    description String
    The description.
    directConnectGatewayId String
    The id of the direct connect gateway.
    tags List<DirectConnectGatewayAttachmentTag>
    Tags.
    transitRouterAttachmentId String
    The id of the transit router direct connect gateway attachment.
    transitRouterAttachmentName String
    The name of the transit router direct connect gateway attachment.
    transitRouterId String
    The id of the transit router.
    description string
    The description.
    directConnectGatewayId string
    The id of the direct connect gateway.
    tags DirectConnectGatewayAttachmentTag[]
    Tags.
    transitRouterAttachmentId string
    The id of the transit router direct connect gateway attachment.
    transitRouterAttachmentName string
    The name of the transit router direct connect gateway attachment.
    transitRouterId string
    The id of the transit router.
    description str
    The description.
    direct_connect_gateway_id str
    The id of the direct connect gateway.
    tags Sequence[DirectConnectGatewayAttachmentTagArgs]
    Tags.
    transit_router_attachment_id str
    The id of the transit router direct connect gateway attachment.
    transit_router_attachment_name str
    The name of the transit router direct connect gateway attachment.
    transit_router_id str
    The id of the transit router.
    description String
    The description.
    directConnectGatewayId String
    The id of the direct connect gateway.
    tags List<Property Map>
    Tags.
    transitRouterAttachmentId String
    The id of the transit router direct connect gateway attachment.
    transitRouterAttachmentName String
    The name of the transit router direct connect gateway attachment.
    transitRouterId String
    The id of the transit router.

    Supporting Types

    DirectConnectGatewayAttachmentTag, DirectConnectGatewayAttachmentTagArgs

    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.
    key string
    The Key of Tags.
    value string
    The Value of Tags.
    key str
    The Key of Tags.
    value str
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.

    Import

    TransitRouterDirectConnectGatewayAttachment can be imported using the transitRouterId:attachmentId, e.g.

     $ pulumi import volcengine:transit_router/directConnectGatewayAttachment:DirectConnectGatewayAttachment default tr-2d6fr7mzya2gw58ozfes5g2oh:tr-attach-7qthudw0ll6jmc****
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine