volcengine.transit_router.DirectConnectGatewayAttachment
Explore with Pulumi AI
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=[volcengine.transit_router.DirectConnectGatewayAttachmentTagArgs(
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
The DirectConnectGatewayAttachment resource accepts the following input properties:
- Direct
Connect stringGateway Id - The id of the direct connect gateway.
- Transit
Router stringId - The id of the transit router.
- Description string
- The description.
- List<Direct
Connect Gateway Attachment Tag> - Tags.
- Transit
Router stringAttachment Name - The name of the transit router direct connect gateway attachment.
- Direct
Connect stringGateway Id - The id of the direct connect gateway.
- Transit
Router stringId - The id of the transit router.
- Description string
- The description.
- []Direct
Connect Gateway Attachment Tag Args - Tags.
- Transit
Router stringAttachment Name - The name of the transit router direct connect gateway attachment.
- direct
Connect StringGateway Id - The id of the direct connect gateway.
- transit
Router StringId - The id of the transit router.
- description String
- The description.
- List<Direct
Connect Gateway Attachment Tag> - Tags.
- transit
Router StringAttachment Name - The name of the transit router direct connect gateway attachment.
- direct
Connect stringGateway Id - The id of the direct connect gateway.
- transit
Router stringId - The id of the transit router.
- description string
- The description.
- Direct
Connect Gateway Attachment Tag[] - Tags.
- transit
Router stringAttachment Name - The name of the transit router direct connect gateway attachment.
- direct_
connect_ strgateway_ id - The id of the direct connect gateway.
- transit_
router_ strid - The id of the transit router.
- description str
- The description.
- Sequence[Direct
Connect Gateway Attachment Tag Args] - Tags.
- transit_
router_ strattachment_ name - The name of the transit router direct connect gateway attachment.
- direct
Connect StringGateway Id - The id of the direct connect gateway.
- transit
Router StringId - The id of the transit router.
- description String
- The description.
- List<Property Map>
- Tags.
- transit
Router StringAttachment Name - 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.
- Transit
Router stringAttachment Id - The id of the transit router direct connect gateway attachment.
- Id string
- The provider-assigned unique ID for this managed resource.
- Transit
Router stringAttachment Id - The id of the transit router direct connect gateway attachment.
- id String
- The provider-assigned unique ID for this managed resource.
- transit
Router StringAttachment Id - The id of the transit router direct connect gateway attachment.
- id string
- The provider-assigned unique ID for this managed resource.
- transit
Router stringAttachment Id - The id of the transit router direct connect gateway attachment.
- id str
- The provider-assigned unique ID for this managed resource.
- transit_
router_ strattachment_ id - The id of the transit router direct connect gateway attachment.
- id String
- The provider-assigned unique ID for this managed resource.
- transit
Router StringAttachment Id - 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.
- Description string
- The description.
- Direct
Connect stringGateway Id - The id of the direct connect gateway.
- List<Direct
Connect Gateway Attachment Tag> - Tags.
- Transit
Router stringAttachment Id - The id of the transit router direct connect gateway attachment.
- Transit
Router stringAttachment Name - The name of the transit router direct connect gateway attachment.
- Transit
Router stringId - The id of the transit router.
- Description string
- The description.
- Direct
Connect stringGateway Id - The id of the direct connect gateway.
- []Direct
Connect Gateway Attachment Tag Args - Tags.
- Transit
Router stringAttachment Id - The id of the transit router direct connect gateway attachment.
- Transit
Router stringAttachment Name - The name of the transit router direct connect gateway attachment.
- Transit
Router stringId - The id of the transit router.
- description String
- The description.
- direct
Connect StringGateway Id - The id of the direct connect gateway.
- List<Direct
Connect Gateway Attachment Tag> - Tags.
- transit
Router StringAttachment Id - The id of the transit router direct connect gateway attachment.
- transit
Router StringAttachment Name - The name of the transit router direct connect gateway attachment.
- transit
Router StringId - The id of the transit router.
- description string
- The description.
- direct
Connect stringGateway Id - The id of the direct connect gateway.
- Direct
Connect Gateway Attachment Tag[] - Tags.
- transit
Router stringAttachment Id - The id of the transit router direct connect gateway attachment.
- transit
Router stringAttachment Name - The name of the transit router direct connect gateway attachment.
- transit
Router stringId - The id of the transit router.
- description str
- The description.
- direct_
connect_ strgateway_ id - The id of the direct connect gateway.
- Sequence[Direct
Connect Gateway Attachment Tag Args] - Tags.
- transit_
router_ strattachment_ id - The id of the transit router direct connect gateway attachment.
- transit_
router_ strattachment_ name - The name of the transit router direct connect gateway attachment.
- transit_
router_ strid - The id of the transit router.
- description String
- The description.
- direct
Connect StringGateway Id - The id of the direct connect gateway.
- List<Property Map>
- Tags.
- transit
Router StringAttachment Id - The id of the transit router direct connect gateway attachment.
- transit
Router StringAttachment Name - The name of the transit router direct connect gateway attachment.
- transit
Router StringId - The id of the transit router.
Supporting Types
DirectConnectGatewayAttachmentTag, DirectConnectGatewayAttachmentTagArgs
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.