volcengine.transit_router.PeerAttachment
Explore with Pulumi AI
Provides a resource to manage transit router peer attachment
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooBandwidthPackage = new Volcengine.Transit_router.BandwidthPackage("fooBandwidthPackage", new()
{
TransitRouterBandwidthPackageName = "acc-tf-test",
Description = "acc-test",
Bandwidth = 2,
Period = 1,
RenewType = "Manual",
RenewPeriod = 1,
RemainRenewTimes = -1,
});
var fooTransitRouter = new Volcengine.Transit_router.TransitRouter("fooTransitRouter", new()
{
TransitRouterName = "acc-test-tf",
Description = "acc-test-tf",
});
var fooPeerAttachment = new Volcengine.Transit_router.PeerAttachment("fooPeerAttachment", new()
{
TransitRouterId = fooTransitRouter.Id,
TransitRouterAttachmentName = "acc-test-tf",
Description = "tf-test",
PeerTransitRouterId = "tr-xxx",
PeerTransitRouterRegionId = "cn-xx",
TransitRouterBandwidthPackageId = fooBandwidthPackage.Id,
Bandwidth = 2,
Tags = new[]
{
new Volcengine.Transit_router.Inputs.PeerAttachmentTagArgs
{
Key = "k1",
Value = "v1",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/transit_router"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooBandwidthPackage, err := transit_router.NewBandwidthPackage(ctx, "fooBandwidthPackage", &transit_router.BandwidthPackageArgs{
TransitRouterBandwidthPackageName: pulumi.String("acc-tf-test"),
Description: pulumi.String("acc-test"),
Bandwidth: pulumi.Int(2),
Period: pulumi.Int(1),
RenewType: pulumi.String("Manual"),
RenewPeriod: pulumi.Int(1),
RemainRenewTimes: -1,
})
if err != nil {
return err
}
fooTransitRouter, err := transit_router.NewTransitRouter(ctx, "fooTransitRouter", &transit_router.TransitRouterArgs{
TransitRouterName: pulumi.String("acc-test-tf"),
Description: pulumi.String("acc-test-tf"),
})
if err != nil {
return err
}
_, err = transit_router.NewPeerAttachment(ctx, "fooPeerAttachment", &transit_router.PeerAttachmentArgs{
TransitRouterId: fooTransitRouter.ID(),
TransitRouterAttachmentName: pulumi.String("acc-test-tf"),
Description: pulumi.String("tf-test"),
PeerTransitRouterId: pulumi.String("tr-xxx"),
PeerTransitRouterRegionId: pulumi.String("cn-xx"),
TransitRouterBandwidthPackageId: fooBandwidthPackage.ID(),
Bandwidth: pulumi.Int(2),
Tags: transit_router.PeerAttachmentTagArray{
&transit_router.PeerAttachmentTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_volcengine as volcengine
foo_bandwidth_package = volcengine.transit_router.BandwidthPackage("fooBandwidthPackage",
transit_router_bandwidth_package_name="acc-tf-test",
description="acc-test",
bandwidth=2,
period=1,
renew_type="Manual",
renew_period=1,
remain_renew_times=-1)
foo_transit_router = volcengine.transit_router.TransitRouter("fooTransitRouter",
transit_router_name="acc-test-tf",
description="acc-test-tf")
foo_peer_attachment = volcengine.transit_router.PeerAttachment("fooPeerAttachment",
transit_router_id=foo_transit_router.id,
transit_router_attachment_name="acc-test-tf",
description="tf-test",
peer_transit_router_id="tr-xxx",
peer_transit_router_region_id="cn-xx",
transit_router_bandwidth_package_id=foo_bandwidth_package.id,
bandwidth=2,
tags=[volcengine.transit_router.PeerAttachmentTagArgs(
key="k1",
value="v1",
)])
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const fooBandwidthPackage = new volcengine.transit_router.BandwidthPackage("fooBandwidthPackage", {
transitRouterBandwidthPackageName: "acc-tf-test",
description: "acc-test",
bandwidth: 2,
period: 1,
renewType: "Manual",
renewPeriod: 1,
remainRenewTimes: -1,
});
const fooTransitRouter = new volcengine.transit_router.TransitRouter("fooTransitRouter", {
transitRouterName: "acc-test-tf",
description: "acc-test-tf",
});
const fooPeerAttachment = new volcengine.transit_router.PeerAttachment("fooPeerAttachment", {
transitRouterId: fooTransitRouter.id,
transitRouterAttachmentName: "acc-test-tf",
description: "tf-test",
peerTransitRouterId: "tr-xxx",
peerTransitRouterRegionId: "cn-xx",
transitRouterBandwidthPackageId: fooBandwidthPackage.id,
bandwidth: 2,
tags: [{
key: "k1",
value: "v1",
}],
});
Coming soon!
Create PeerAttachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PeerAttachment(name: string, args: PeerAttachmentArgs, opts?: CustomResourceOptions);
@overload
def PeerAttachment(resource_name: str,
args: PeerAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PeerAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
peer_transit_router_id: Optional[str] = None,
peer_transit_router_region_id: Optional[str] = None,
transit_router_id: Optional[str] = None,
bandwidth: Optional[int] = None,
description: Optional[str] = None,
tags: Optional[Sequence[PeerAttachmentTagArgs]] = None,
transit_router_attachment_name: Optional[str] = None,
transit_router_bandwidth_package_id: Optional[str] = None)
func NewPeerAttachment(ctx *Context, name string, args PeerAttachmentArgs, opts ...ResourceOption) (*PeerAttachment, error)
public PeerAttachment(string name, PeerAttachmentArgs args, CustomResourceOptions? opts = null)
public PeerAttachment(String name, PeerAttachmentArgs args)
public PeerAttachment(String name, PeerAttachmentArgs args, CustomResourceOptions options)
type: volcengine:transit_router:PeerAttachment
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 PeerAttachmentArgs
- 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 PeerAttachmentArgs
- 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 PeerAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PeerAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PeerAttachmentArgs
- 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 peerAttachmentResource = new Volcengine.Transit_router.PeerAttachment("peerAttachmentResource", new()
{
PeerTransitRouterId = "string",
PeerTransitRouterRegionId = "string",
TransitRouterId = "string",
Bandwidth = 0,
Description = "string",
Tags = new[]
{
new Volcengine.Transit_router.Inputs.PeerAttachmentTagArgs
{
Key = "string",
Value = "string",
},
},
TransitRouterAttachmentName = "string",
TransitRouterBandwidthPackageId = "string",
});
example, err := transit_router.NewPeerAttachment(ctx, "peerAttachmentResource", &transit_router.PeerAttachmentArgs{
PeerTransitRouterId: pulumi.String("string"),
PeerTransitRouterRegionId: pulumi.String("string"),
TransitRouterId: pulumi.String("string"),
Bandwidth: pulumi.Int(0),
Description: pulumi.String("string"),
Tags: transit_router.PeerAttachmentTagArray{
&transit_router.PeerAttachmentTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
TransitRouterAttachmentName: pulumi.String("string"),
TransitRouterBandwidthPackageId: pulumi.String("string"),
})
var peerAttachmentResource = new PeerAttachment("peerAttachmentResource", PeerAttachmentArgs.builder()
.peerTransitRouterId("string")
.peerTransitRouterRegionId("string")
.transitRouterId("string")
.bandwidth(0)
.description("string")
.tags(PeerAttachmentTagArgs.builder()
.key("string")
.value("string")
.build())
.transitRouterAttachmentName("string")
.transitRouterBandwidthPackageId("string")
.build());
peer_attachment_resource = volcengine.transit_router.PeerAttachment("peerAttachmentResource",
peer_transit_router_id="string",
peer_transit_router_region_id="string",
transit_router_id="string",
bandwidth=0,
description="string",
tags=[volcengine.transit_router.PeerAttachmentTagArgs(
key="string",
value="string",
)],
transit_router_attachment_name="string",
transit_router_bandwidth_package_id="string")
const peerAttachmentResource = new volcengine.transit_router.PeerAttachment("peerAttachmentResource", {
peerTransitRouterId: "string",
peerTransitRouterRegionId: "string",
transitRouterId: "string",
bandwidth: 0,
description: "string",
tags: [{
key: "string",
value: "string",
}],
transitRouterAttachmentName: "string",
transitRouterBandwidthPackageId: "string",
});
type: volcengine:transit_router:PeerAttachment
properties:
bandwidth: 0
description: string
peerTransitRouterId: string
peerTransitRouterRegionId: string
tags:
- key: string
value: string
transitRouterAttachmentName: string
transitRouterBandwidthPackageId: string
transitRouterId: string
PeerAttachment 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 PeerAttachment resource accepts the following input properties:
- Peer
Transit stringRouter Id - The id of the peer transit router.
- Peer
Transit stringRouter Region Id - The region id of the peer transit router.
- Transit
Router stringId - The id of the local transit router.
- Bandwidth int
- The bandwidth of the transit router peer attachment. Unit: Mbps.
- Description string
- The description of the transit router peer attachment.
- List<Peer
Attachment Tag> - Tags.
- Transit
Router stringAttachment Name - The name of the transit router peer attachment.
- Transit
Router stringBandwidth Package Id - The bandwidth package id of the transit router peer attachment. When specifying this field, the field
bandwidth
must also be specified.
- Peer
Transit stringRouter Id - The id of the peer transit router.
- Peer
Transit stringRouter Region Id - The region id of the peer transit router.
- Transit
Router stringId - The id of the local transit router.
- Bandwidth int
- The bandwidth of the transit router peer attachment. Unit: Mbps.
- Description string
- The description of the transit router peer attachment.
- []Peer
Attachment Tag Args - Tags.
- Transit
Router stringAttachment Name - The name of the transit router peer attachment.
- Transit
Router stringBandwidth Package Id - The bandwidth package id of the transit router peer attachment. When specifying this field, the field
bandwidth
must also be specified.
- peer
Transit StringRouter Id - The id of the peer transit router.
- peer
Transit StringRouter Region Id - The region id of the peer transit router.
- transit
Router StringId - The id of the local transit router.
- bandwidth Integer
- The bandwidth of the transit router peer attachment. Unit: Mbps.
- description String
- The description of the transit router peer attachment.
- List<Peer
Attachment Tag> - Tags.
- transit
Router StringAttachment Name - The name of the transit router peer attachment.
- transit
Router StringBandwidth Package Id - The bandwidth package id of the transit router peer attachment. When specifying this field, the field
bandwidth
must also be specified.
- peer
Transit stringRouter Id - The id of the peer transit router.
- peer
Transit stringRouter Region Id - The region id of the peer transit router.
- transit
Router stringId - The id of the local transit router.
- bandwidth number
- The bandwidth of the transit router peer attachment. Unit: Mbps.
- description string
- The description of the transit router peer attachment.
- Peer
Attachment Tag[] - Tags.
- transit
Router stringAttachment Name - The name of the transit router peer attachment.
- transit
Router stringBandwidth Package Id - The bandwidth package id of the transit router peer attachment. When specifying this field, the field
bandwidth
must also be specified.
- peer_
transit_ strrouter_ id - The id of the peer transit router.
- peer_
transit_ strrouter_ region_ id - The region id of the peer transit router.
- transit_
router_ strid - The id of the local transit router.
- bandwidth int
- The bandwidth of the transit router peer attachment. Unit: Mbps.
- description str
- The description of the transit router peer attachment.
- Sequence[Peer
Attachment Tag Args] - Tags.
- transit_
router_ strattachment_ name - The name of the transit router peer attachment.
- transit_
router_ strbandwidth_ package_ id - The bandwidth package id of the transit router peer attachment. When specifying this field, the field
bandwidth
must also be specified.
- peer
Transit StringRouter Id - The id of the peer transit router.
- peer
Transit StringRouter Region Id - The region id of the peer transit router.
- transit
Router StringId - The id of the local transit router.
- bandwidth Number
- The bandwidth of the transit router peer attachment. Unit: Mbps.
- description String
- The description of the transit router peer attachment.
- List<Property Map>
- Tags.
- transit
Router StringAttachment Name - The name of the transit router peer attachment.
- transit
Router StringBandwidth Package Id - The bandwidth package id of the transit router peer attachment. When specifying this field, the field
bandwidth
must also be specified.
Outputs
All input properties are implicitly available as output properties. Additionally, the PeerAttachment resource produces the following output properties:
- Creation
Time string - The creation time of the transit router peer attachment.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the transit router peer attachment.
- Transit
Router stringRoute Table Id - The route table id of the transit router peer attachment.
- Update
Time string - The update time of the transit router peer attachment.
- Creation
Time string - The creation time of the transit router peer attachment.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the transit router peer attachment.
- Transit
Router stringRoute Table Id - The route table id of the transit router peer attachment.
- Update
Time string - The update time of the transit router peer attachment.
- creation
Time String - The creation time of the transit router peer attachment.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the transit router peer attachment.
- transit
Router StringRoute Table Id - The route table id of the transit router peer attachment.
- update
Time String - The update time of the transit router peer attachment.
- creation
Time string - The creation time of the transit router peer attachment.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- The status of the transit router peer attachment.
- transit
Router stringRoute Table Id - The route table id of the transit router peer attachment.
- update
Time string - The update time of the transit router peer attachment.
- creation_
time str - The creation time of the transit router peer attachment.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- The status of the transit router peer attachment.
- transit_
router_ strroute_ table_ id - The route table id of the transit router peer attachment.
- update_
time str - The update time of the transit router peer attachment.
- creation
Time String - The creation time of the transit router peer attachment.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the transit router peer attachment.
- transit
Router StringRoute Table Id - The route table id of the transit router peer attachment.
- update
Time String - The update time of the transit router peer attachment.
Look up Existing PeerAttachment Resource
Get an existing PeerAttachment 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?: PeerAttachmentState, opts?: CustomResourceOptions): PeerAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bandwidth: Optional[int] = None,
creation_time: Optional[str] = None,
description: Optional[str] = None,
peer_transit_router_id: Optional[str] = None,
peer_transit_router_region_id: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Sequence[PeerAttachmentTagArgs]] = None,
transit_router_attachment_name: Optional[str] = None,
transit_router_bandwidth_package_id: Optional[str] = None,
transit_router_id: Optional[str] = None,
transit_router_route_table_id: Optional[str] = None,
update_time: Optional[str] = None) -> PeerAttachment
func GetPeerAttachment(ctx *Context, name string, id IDInput, state *PeerAttachmentState, opts ...ResourceOption) (*PeerAttachment, error)
public static PeerAttachment Get(string name, Input<string> id, PeerAttachmentState? state, CustomResourceOptions? opts = null)
public static PeerAttachment get(String name, Output<String> id, PeerAttachmentState 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.
- Bandwidth int
- The bandwidth of the transit router peer attachment. Unit: Mbps.
- Creation
Time string - The creation time of the transit router peer attachment.
- Description string
- The description of the transit router peer attachment.
- Peer
Transit stringRouter Id - The id of the peer transit router.
- Peer
Transit stringRouter Region Id - The region id of the peer transit router.
- Status string
- The status of the transit router peer attachment.
- List<Peer
Attachment Tag> - Tags.
- Transit
Router stringAttachment Name - The name of the transit router peer attachment.
- Transit
Router stringBandwidth Package Id - The bandwidth package id of the transit router peer attachment. When specifying this field, the field
bandwidth
must also be specified. - Transit
Router stringId - The id of the local transit router.
- Transit
Router stringRoute Table Id - The route table id of the transit router peer attachment.
- Update
Time string - The update time of the transit router peer attachment.
- Bandwidth int
- The bandwidth of the transit router peer attachment. Unit: Mbps.
- Creation
Time string - The creation time of the transit router peer attachment.
- Description string
- The description of the transit router peer attachment.
- Peer
Transit stringRouter Id - The id of the peer transit router.
- Peer
Transit stringRouter Region Id - The region id of the peer transit router.
- Status string
- The status of the transit router peer attachment.
- []Peer
Attachment Tag Args - Tags.
- Transit
Router stringAttachment Name - The name of the transit router peer attachment.
- Transit
Router stringBandwidth Package Id - The bandwidth package id of the transit router peer attachment. When specifying this field, the field
bandwidth
must also be specified. - Transit
Router stringId - The id of the local transit router.
- Transit
Router stringRoute Table Id - The route table id of the transit router peer attachment.
- Update
Time string - The update time of the transit router peer attachment.
- bandwidth Integer
- The bandwidth of the transit router peer attachment. Unit: Mbps.
- creation
Time String - The creation time of the transit router peer attachment.
- description String
- The description of the transit router peer attachment.
- peer
Transit StringRouter Id - The id of the peer transit router.
- peer
Transit StringRouter Region Id - The region id of the peer transit router.
- status String
- The status of the transit router peer attachment.
- List<Peer
Attachment Tag> - Tags.
- transit
Router StringAttachment Name - The name of the transit router peer attachment.
- transit
Router StringBandwidth Package Id - The bandwidth package id of the transit router peer attachment. When specifying this field, the field
bandwidth
must also be specified. - transit
Router StringId - The id of the local transit router.
- transit
Router StringRoute Table Id - The route table id of the transit router peer attachment.
- update
Time String - The update time of the transit router peer attachment.
- bandwidth number
- The bandwidth of the transit router peer attachment. Unit: Mbps.
- creation
Time string - The creation time of the transit router peer attachment.
- description string
- The description of the transit router peer attachment.
- peer
Transit stringRouter Id - The id of the peer transit router.
- peer
Transit stringRouter Region Id - The region id of the peer transit router.
- status string
- The status of the transit router peer attachment.
- Peer
Attachment Tag[] - Tags.
- transit
Router stringAttachment Name - The name of the transit router peer attachment.
- transit
Router stringBandwidth Package Id - The bandwidth package id of the transit router peer attachment. When specifying this field, the field
bandwidth
must also be specified. - transit
Router stringId - The id of the local transit router.
- transit
Router stringRoute Table Id - The route table id of the transit router peer attachment.
- update
Time string - The update time of the transit router peer attachment.
- bandwidth int
- The bandwidth of the transit router peer attachment. Unit: Mbps.
- creation_
time str - The creation time of the transit router peer attachment.
- description str
- The description of the transit router peer attachment.
- peer_
transit_ strrouter_ id - The id of the peer transit router.
- peer_
transit_ strrouter_ region_ id - The region id of the peer transit router.
- status str
- The status of the transit router peer attachment.
- Sequence[Peer
Attachment Tag Args] - Tags.
- transit_
router_ strattachment_ name - The name of the transit router peer attachment.
- transit_
router_ strbandwidth_ package_ id - The bandwidth package id of the transit router peer attachment. When specifying this field, the field
bandwidth
must also be specified. - transit_
router_ strid - The id of the local transit router.
- transit_
router_ strroute_ table_ id - The route table id of the transit router peer attachment.
- update_
time str - The update time of the transit router peer attachment.
- bandwidth Number
- The bandwidth of the transit router peer attachment. Unit: Mbps.
- creation
Time String - The creation time of the transit router peer attachment.
- description String
- The description of the transit router peer attachment.
- peer
Transit StringRouter Id - The id of the peer transit router.
- peer
Transit StringRouter Region Id - The region id of the peer transit router.
- status String
- The status of the transit router peer attachment.
- List<Property Map>
- Tags.
- transit
Router StringAttachment Name - The name of the transit router peer attachment.
- transit
Router StringBandwidth Package Id - The bandwidth package id of the transit router peer attachment. When specifying this field, the field
bandwidth
must also be specified. - transit
Router StringId - The id of the local transit router.
- transit
Router StringRoute Table Id - The route table id of the transit router peer attachment.
- update
Time String - The update time of the transit router peer attachment.
Supporting Types
PeerAttachmentTag, PeerAttachmentTagArgs
Import
TransitRouterPeerAttachment can be imported using the id, e.g.
$ pulumi import volcengine:transit_router/peerAttachment:PeerAttachment default tr-attach-12be67d0yh2io17q7y1au****
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.