volcengine.transit_router.RouteTablePropagation
Explore with Pulumi AI
Provides a resource to manage transit router route table propagation
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 = "test-tf-acc",
Description = "test-tf-acc",
});
var fooRouteTable = new Volcengine.Transit_router.RouteTable("fooRouteTable", new()
{
Description = "tf-test-acc-description",
TransitRouterRouteTableName = "tf-table-test-acc",
TransitRouterId = fooTransitRouter.Id,
});
var fooZones = Volcengine.Ecs.Zones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc-acc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
VpcId = fooVpc.Id,
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
SubnetName = "acc-test-subnet",
});
var foo2 = new Volcengine.Vpc.Subnet("foo2", new()
{
VpcId = fooVpc.Id,
CidrBlock = "172.16.255.0/24",
ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[1]?.Id),
SubnetName = "acc-test-subnet2",
});
var fooVpcAttachment = new Volcengine.Transit_router.VpcAttachment("fooVpcAttachment", new()
{
TransitRouterId = fooTransitRouter.Id,
VpcId = fooVpc.Id,
AttachPoints = new[]
{
new Volcengine.Transit_router.Inputs.VpcAttachmentAttachPointArgs
{
SubnetId = fooSubnet.Id,
ZoneId = "cn-beijing-a",
},
new Volcengine.Transit_router.Inputs.VpcAttachmentAttachPointArgs
{
SubnetId = foo2.Id,
ZoneId = "cn-beijing-b",
},
},
TransitRouterAttachmentName = "tf-test-acc-name1",
Description = "tf-test-acc-description",
});
var fooRouteTablePropagation = new Volcengine.Transit_router.RouteTablePropagation("fooRouteTablePropagation", new()
{
TransitRouterAttachmentId = fooVpcAttachment.TransitRouterAttachmentId,
TransitRouterRouteTableId = fooRouteTable.TransitRouterRouteTableId,
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/transit_router"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooTransitRouter, err := transit_router.NewTransitRouter(ctx, "fooTransitRouter", &transit_router.TransitRouterArgs{
TransitRouterName: pulumi.String("test-tf-acc"),
Description: pulumi.String("test-tf-acc"),
})
if err != nil {
return err
}
fooRouteTable, err := transit_router.NewRouteTable(ctx, "fooRouteTable", &transit_router.RouteTableArgs{
Description: pulumi.String("tf-test-acc-description"),
TransitRouterRouteTableName: pulumi.String("tf-table-test-acc"),
TransitRouterId: fooTransitRouter.ID(),
})
if err != nil {
return err
}
fooZones, err := ecs.Zones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc-acc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
VpcId: fooVpc.ID(),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: *pulumi.String(fooZones.Zones[0].Id),
SubnetName: pulumi.String("acc-test-subnet"),
})
if err != nil {
return err
}
foo2, err := vpc.NewSubnet(ctx, "foo2", &vpc.SubnetArgs{
VpcId: fooVpc.ID(),
CidrBlock: pulumi.String("172.16.255.0/24"),
ZoneId: *pulumi.String(fooZones.Zones[1].Id),
SubnetName: pulumi.String("acc-test-subnet2"),
})
if err != nil {
return err
}
fooVpcAttachment, err := transit_router.NewVpcAttachment(ctx, "fooVpcAttachment", &transit_router.VpcAttachmentArgs{
TransitRouterId: fooTransitRouter.ID(),
VpcId: fooVpc.ID(),
AttachPoints: transit_router.VpcAttachmentAttachPointArray{
&transit_router.VpcAttachmentAttachPointArgs{
SubnetId: fooSubnet.ID(),
ZoneId: pulumi.String("cn-beijing-a"),
},
&transit_router.VpcAttachmentAttachPointArgs{
SubnetId: foo2.ID(),
ZoneId: pulumi.String("cn-beijing-b"),
},
},
TransitRouterAttachmentName: pulumi.String("tf-test-acc-name1"),
Description: pulumi.String("tf-test-acc-description"),
})
if err != nil {
return err
}
_, err = transit_router.NewRouteTablePropagation(ctx, "fooRouteTablePropagation", &transit_router.RouteTablePropagationArgs{
TransitRouterAttachmentId: fooVpcAttachment.TransitRouterAttachmentId,
TransitRouterRouteTableId: fooRouteTable.TransitRouterRouteTableId,
})
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.transit_router.RouteTable;
import com.pulumi.volcengine.transit_router.RouteTableArgs;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.transit_router.VpcAttachment;
import com.pulumi.volcengine.transit_router.VpcAttachmentArgs;
import com.pulumi.volcengine.transit_router.inputs.VpcAttachmentAttachPointArgs;
import com.pulumi.volcengine.transit_router.RouteTablePropagation;
import com.pulumi.volcengine.transit_router.RouteTablePropagationArgs;
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("test-tf-acc")
.description("test-tf-acc")
.build());
var fooRouteTable = new RouteTable("fooRouteTable", RouteTableArgs.builder()
.description("tf-test-acc-description")
.transitRouterRouteTableName("tf-table-test-acc")
.transitRouterId(fooTransitRouter.id())
.build());
final var fooZones = EcsFunctions.Zones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc-acc")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.vpcId(fooVpc.id())
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
.subnetName("acc-test-subnet")
.build());
var foo2 = new Subnet("foo2", SubnetArgs.builder()
.vpcId(fooVpc.id())
.cidrBlock("172.16.255.0/24")
.zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[1].id()))
.subnetName("acc-test-subnet2")
.build());
var fooVpcAttachment = new VpcAttachment("fooVpcAttachment", VpcAttachmentArgs.builder()
.transitRouterId(fooTransitRouter.id())
.vpcId(fooVpc.id())
.attachPoints(
VpcAttachmentAttachPointArgs.builder()
.subnetId(fooSubnet.id())
.zoneId("cn-beijing-a")
.build(),
VpcAttachmentAttachPointArgs.builder()
.subnetId(foo2.id())
.zoneId("cn-beijing-b")
.build())
.transitRouterAttachmentName("tf-test-acc-name1")
.description("tf-test-acc-description")
.build());
var fooRouteTablePropagation = new RouteTablePropagation("fooRouteTablePropagation", RouteTablePropagationArgs.builder()
.transitRouterAttachmentId(fooVpcAttachment.transitRouterAttachmentId())
.transitRouterRouteTableId(fooRouteTable.transitRouterRouteTableId())
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_transit_router = volcengine.transit_router.TransitRouter("fooTransitRouter",
transit_router_name="test-tf-acc",
description="test-tf-acc")
foo_route_table = volcengine.transit_router.RouteTable("fooRouteTable",
description="tf-test-acc-description",
transit_router_route_table_name="tf-table-test-acc",
transit_router_id=foo_transit_router.id)
foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc-acc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
vpc_id=foo_vpc.id,
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
subnet_name="acc-test-subnet")
foo2 = volcengine.vpc.Subnet("foo2",
vpc_id=foo_vpc.id,
cidr_block="172.16.255.0/24",
zone_id=foo_zones.zones[1].id,
subnet_name="acc-test-subnet2")
foo_vpc_attachment = volcengine.transit_router.VpcAttachment("fooVpcAttachment",
transit_router_id=foo_transit_router.id,
vpc_id=foo_vpc.id,
attach_points=[
volcengine.transit_router.VpcAttachmentAttachPointArgs(
subnet_id=foo_subnet.id,
zone_id="cn-beijing-a",
),
volcengine.transit_router.VpcAttachmentAttachPointArgs(
subnet_id=foo2.id,
zone_id="cn-beijing-b",
),
],
transit_router_attachment_name="tf-test-acc-name1",
description="tf-test-acc-description")
foo_route_table_propagation = volcengine.transit_router.RouteTablePropagation("fooRouteTablePropagation",
transit_router_attachment_id=foo_vpc_attachment.transit_router_attachment_id,
transit_router_route_table_id=foo_route_table.transit_router_route_table_id)
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooTransitRouter = new volcengine.transit_router.TransitRouter("fooTransitRouter", {
transitRouterName: "test-tf-acc",
description: "test-tf-acc",
});
const fooRouteTable = new volcengine.transit_router.RouteTable("fooRouteTable", {
description: "tf-test-acc-description",
transitRouterRouteTableName: "tf-table-test-acc",
transitRouterId: fooTransitRouter.id,
});
const fooZones = volcengine.ecs.Zones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc-acc",
cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
vpcId: fooVpc.id,
cidrBlock: "172.16.0.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
subnetName: "acc-test-subnet",
});
const foo2 = new volcengine.vpc.Subnet("foo2", {
vpcId: fooVpc.id,
cidrBlock: "172.16.255.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[1]?.id),
subnetName: "acc-test-subnet2",
});
const fooVpcAttachment = new volcengine.transit_router.VpcAttachment("fooVpcAttachment", {
transitRouterId: fooTransitRouter.id,
vpcId: fooVpc.id,
attachPoints: [
{
subnetId: fooSubnet.id,
zoneId: "cn-beijing-a",
},
{
subnetId: foo2.id,
zoneId: "cn-beijing-b",
},
],
transitRouterAttachmentName: "tf-test-acc-name1",
description: "tf-test-acc-description",
});
const fooRouteTablePropagation = new volcengine.transit_router.RouteTablePropagation("fooRouteTablePropagation", {
transitRouterAttachmentId: fooVpcAttachment.transitRouterAttachmentId,
transitRouterRouteTableId: fooRouteTable.transitRouterRouteTableId,
});
resources:
fooTransitRouter:
type: volcengine:transit_router:TransitRouter
properties:
transitRouterName: test-tf-acc
description: test-tf-acc
fooRouteTable:
type: volcengine:transit_router:RouteTable
properties:
description: tf-test-acc-description
transitRouterRouteTableName: tf-table-test-acc
transitRouterId: ${fooTransitRouter.id}
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc-acc
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
vpcId: ${fooVpc.id}
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[0].id}
subnetName: acc-test-subnet
foo2:
type: volcengine:vpc:Subnet
properties:
vpcId: ${fooVpc.id}
cidrBlock: 172.16.255.0/24
zoneId: ${fooZones.zones[1].id}
subnetName: acc-test-subnet2
fooVpcAttachment:
type: volcengine:transit_router:VpcAttachment
properties:
transitRouterId: ${fooTransitRouter.id}
vpcId: ${fooVpc.id}
attachPoints:
- subnetId: ${fooSubnet.id}
zoneId: cn-beijing-a
- subnetId: ${foo2.id}
zoneId: cn-beijing-b
transitRouterAttachmentName: tf-test-acc-name1
description: tf-test-acc-description
fooRouteTablePropagation:
type: volcengine:transit_router:RouteTablePropagation
properties:
transitRouterAttachmentId: ${fooVpcAttachment.transitRouterAttachmentId}
transitRouterRouteTableId: ${fooRouteTable.transitRouterRouteTableId}
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:Zones
Arguments: {}
Create RouteTablePropagation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RouteTablePropagation(name: string, args: RouteTablePropagationArgs, opts?: CustomResourceOptions);
@overload
def RouteTablePropagation(resource_name: str,
args: RouteTablePropagationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RouteTablePropagation(resource_name: str,
opts: Optional[ResourceOptions] = None,
transit_router_attachment_id: Optional[str] = None,
transit_router_route_table_id: Optional[str] = None)
func NewRouteTablePropagation(ctx *Context, name string, args RouteTablePropagationArgs, opts ...ResourceOption) (*RouteTablePropagation, error)
public RouteTablePropagation(string name, RouteTablePropagationArgs args, CustomResourceOptions? opts = null)
public RouteTablePropagation(String name, RouteTablePropagationArgs args)
public RouteTablePropagation(String name, RouteTablePropagationArgs args, CustomResourceOptions options)
type: volcengine:transit_router:RouteTablePropagation
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 RouteTablePropagationArgs
- 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 RouteTablePropagationArgs
- 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 RouteTablePropagationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouteTablePropagationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RouteTablePropagationArgs
- 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 routeTablePropagationResource = new Volcengine.Transit_router.RouteTablePropagation("routeTablePropagationResource", new()
{
TransitRouterAttachmentId = "string",
TransitRouterRouteTableId = "string",
});
example, err := transit_router.NewRouteTablePropagation(ctx, "routeTablePropagationResource", &transit_router.RouteTablePropagationArgs{
TransitRouterAttachmentId: pulumi.String("string"),
TransitRouterRouteTableId: pulumi.String("string"),
})
var routeTablePropagationResource = new RouteTablePropagation("routeTablePropagationResource", RouteTablePropagationArgs.builder()
.transitRouterAttachmentId("string")
.transitRouterRouteTableId("string")
.build());
route_table_propagation_resource = volcengine.transit_router.RouteTablePropagation("routeTablePropagationResource",
transit_router_attachment_id="string",
transit_router_route_table_id="string")
const routeTablePropagationResource = new volcengine.transit_router.RouteTablePropagation("routeTablePropagationResource", {
transitRouterAttachmentId: "string",
transitRouterRouteTableId: "string",
});
type: volcengine:transit_router:RouteTablePropagation
properties:
transitRouterAttachmentId: string
transitRouterRouteTableId: string
RouteTablePropagation 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 RouteTablePropagation resource accepts the following input properties:
- Transit
Router stringAttachment Id - The ID of the network instance connection.
- Transit
Router stringRoute Table Id - The ID of the routing table associated with the transit router instance.
- Transit
Router stringAttachment Id - The ID of the network instance connection.
- Transit
Router stringRoute Table Id - The ID of the routing table associated with the transit router instance.
- transit
Router StringAttachment Id - The ID of the network instance connection.
- transit
Router StringRoute Table Id - The ID of the routing table associated with the transit router instance.
- transit
Router stringAttachment Id - The ID of the network instance connection.
- transit
Router stringRoute Table Id - The ID of the routing table associated with the transit router instance.
- transit_
router_ strattachment_ id - The ID of the network instance connection.
- transit_
router_ strroute_ table_ id - The ID of the routing table associated with the transit router instance.
- transit
Router StringAttachment Id - The ID of the network instance connection.
- transit
Router StringRoute Table Id - The ID of the routing table associated with the transit router instance.
Outputs
All input properties are implicitly available as output properties. Additionally, the RouteTablePropagation resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing RouteTablePropagation Resource
Get an existing RouteTablePropagation 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?: RouteTablePropagationState, opts?: CustomResourceOptions): RouteTablePropagation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
transit_router_attachment_id: Optional[str] = None,
transit_router_route_table_id: Optional[str] = None) -> RouteTablePropagation
func GetRouteTablePropagation(ctx *Context, name string, id IDInput, state *RouteTablePropagationState, opts ...ResourceOption) (*RouteTablePropagation, error)
public static RouteTablePropagation Get(string name, Input<string> id, RouteTablePropagationState? state, CustomResourceOptions? opts = null)
public static RouteTablePropagation get(String name, Output<String> id, RouteTablePropagationState 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.
- Transit
Router stringAttachment Id - The ID of the network instance connection.
- Transit
Router stringRoute Table Id - The ID of the routing table associated with the transit router instance.
- Transit
Router stringAttachment Id - The ID of the network instance connection.
- Transit
Router stringRoute Table Id - The ID of the routing table associated with the transit router instance.
- transit
Router StringAttachment Id - The ID of the network instance connection.
- transit
Router StringRoute Table Id - The ID of the routing table associated with the transit router instance.
- transit
Router stringAttachment Id - The ID of the network instance connection.
- transit
Router stringRoute Table Id - The ID of the routing table associated with the transit router instance.
- transit_
router_ strattachment_ id - The ID of the network instance connection.
- transit_
router_ strroute_ table_ id - The ID of the routing table associated with the transit router instance.
- transit
Router StringAttachment Id - The ID of the network instance connection.
- transit
Router StringRoute Table Id - The ID of the routing table associated with the transit router instance.
Import
TransitRouterRouteTablePropagation can be imported using the propagation:TransitRouterAttachmentId:TransitRouterRouteTableId, e.g.
$ pulumi import volcengine:transit_router/routeTablePropagation:RouteTablePropagation default propagation:tr-attach-13n2l4c****:tr-rt-1i5i8khf9m58gae5kcx6****
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.