Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine
volcengine.cen.ServiceRouteEntries
Explore with Pulumi AI
Use this data source to query detailed information of cen service route entries
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooVpc = new List<Volcengine.Vpc.Vpc>();
for (var rangeIndex = 0; rangeIndex < 3; rangeIndex++)
{
var range = new { Value = rangeIndex };
fooVpc.Add(new Volcengine.Vpc.Vpc($"fooVpc-{range.Value}", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
}));
}
var fooCen = new Volcengine.Cen.Cen("fooCen", new()
{
CenName = "acc-test-cen",
Description = "acc-test",
ProjectName = "default",
Tags = new[]
{
new Volcengine.Cen.Inputs.CenTagArgs
{
Key = "k1",
Value = "v1",
},
},
});
var fooAttachInstance = new List<Volcengine.Cen.AttachInstance>();
for (var rangeIndex = 0; rangeIndex < 3; rangeIndex++)
{
var range = new { Value = rangeIndex };
fooAttachInstance.Add(new Volcengine.Cen.AttachInstance($"fooAttachInstance-{range.Value}", new()
{
CenId = fooCen.Id,
InstanceId = fooVpc[range.Value].Id,
InstanceRegionId = "cn-beijing",
InstanceType = "VPC",
}));
}
var fooServiceRouteEntry = new Volcengine.Cen.ServiceRouteEntry("fooServiceRouteEntry", new()
{
CenId = fooCen.Id,
DestinationCidrBlock = "100.64.0.0/11",
ServiceRegionId = "cn-beijing",
ServiceVpcId = fooAttachInstance[0].InstanceId,
Description = "acc-test",
PublishMode = "Custom",
PublishToInstances = new[]
{
new Volcengine.Cen.Inputs.ServiceRouteEntryPublishToInstanceArgs
{
InstanceRegionId = "cn-beijing",
InstanceType = "VPC",
InstanceId = fooAttachInstance[1].InstanceId,
},
new Volcengine.Cen.Inputs.ServiceRouteEntryPublishToInstanceArgs
{
InstanceRegionId = "cn-beijing",
InstanceType = "VPC",
InstanceId = fooAttachInstance[2].InstanceId,
},
},
});
var fooServiceRouteEntries = Volcengine.Cen.ServiceRouteEntries.Invoke(new()
{
CenId = fooCen.Id,
DestinationCidrBlock = fooServiceRouteEntry.DestinationCidrBlock,
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cen"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
var fooVpc []*vpc.Vpc
for index := 0; index < 3; index++ {
key0 := index
_ := index
__res, err := vpc.NewVpc(ctx, fmt.Sprintf("fooVpc-%v", key0), &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooVpc = append(fooVpc, __res)
}
fooCen, err := cen.NewCen(ctx, "fooCen", &cen.CenArgs{
CenName: pulumi.String("acc-test-cen"),
Description: pulumi.String("acc-test"),
ProjectName: pulumi.String("default"),
Tags: cen.CenTagArray{
&cen.CenTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
})
if err != nil {
return err
}
var fooAttachInstance []*cen.AttachInstance
for index := 0; index < 3; index++ {
key0 := index
val0 := index
__res, err := cen.NewAttachInstance(ctx, fmt.Sprintf("fooAttachInstance-%v", key0), &cen.AttachInstanceArgs{
CenId: fooCen.ID(),
InstanceId: fooVpc[val0].ID(),
InstanceRegionId: pulumi.String("cn-beijing"),
InstanceType: pulumi.String("VPC"),
})
if err != nil {
return err
}
fooAttachInstance = append(fooAttachInstance, __res)
}
fooServiceRouteEntry, err := cen.NewServiceRouteEntry(ctx, "fooServiceRouteEntry", &cen.ServiceRouteEntryArgs{
CenId: fooCen.ID(),
DestinationCidrBlock: pulumi.String("100.64.0.0/11"),
ServiceRegionId: pulumi.String("cn-beijing"),
ServiceVpcId: fooAttachInstance[0].InstanceId,
Description: pulumi.String("acc-test"),
PublishMode: pulumi.String("Custom"),
PublishToInstances: cen.ServiceRouteEntryPublishToInstanceArray{
&cen.ServiceRouteEntryPublishToInstanceArgs{
InstanceRegionId: pulumi.String("cn-beijing"),
InstanceType: pulumi.String("VPC"),
InstanceId: fooAttachInstance[1].InstanceId,
},
&cen.ServiceRouteEntryPublishToInstanceArgs{
InstanceRegionId: pulumi.String("cn-beijing"),
InstanceType: pulumi.String("VPC"),
InstanceId: fooAttachInstance[2].InstanceId,
},
},
})
if err != nil {
return err
}
_ = cen.ServiceRouteEntriesOutput(ctx, cen.ServiceRouteEntriesOutputArgs{
CenId: fooCen.ID(),
DestinationCidrBlock: fooServiceRouteEntry.DestinationCidrBlock,
}, nil)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.cen.Cen;
import com.pulumi.volcengine.cen.CenArgs;
import com.pulumi.volcengine.cen.inputs.CenTagArgs;
import com.pulumi.volcengine.cen.AttachInstance;
import com.pulumi.volcengine.cen.AttachInstanceArgs;
import com.pulumi.volcengine.cen.ServiceRouteEntry;
import com.pulumi.volcengine.cen.ServiceRouteEntryArgs;
import com.pulumi.volcengine.cen.inputs.ServiceRouteEntryPublishToInstanceArgs;
import com.pulumi.volcengine.cen.CenFunctions;
import com.pulumi.volcengine.cen.inputs.ServiceRouteEntriesArgs;
import com.pulumi.codegen.internal.KeyedValue;
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) {
for (var i = 0; i < 3; i++) {
new Vpc("fooVpc-" + i, VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
}
var fooCen = new Cen("fooCen", CenArgs.builder()
.cenName("acc-test-cen")
.description("acc-test")
.projectName("default")
.tags(CenTagArgs.builder()
.key("k1")
.value("v1")
.build())
.build());
for (var i = 0; i < 3; i++) {
new AttachInstance("fooAttachInstance-" + i, AttachInstanceArgs.builder()
.cenId(fooCen.id())
.instanceId(fooVpc[range.value()].id())
.instanceRegionId("cn-beijing")
.instanceType("VPC")
.build());
}
var fooServiceRouteEntry = new ServiceRouteEntry("fooServiceRouteEntry", ServiceRouteEntryArgs.builder()
.cenId(fooCen.id())
.destinationCidrBlock("100.64.0.0/11")
.serviceRegionId("cn-beijing")
.serviceVpcId(fooAttachInstance[0].instanceId())
.description("acc-test")
.publishMode("Custom")
.publishToInstances(
ServiceRouteEntryPublishToInstanceArgs.builder()
.instanceRegionId("cn-beijing")
.instanceType("VPC")
.instanceId(fooAttachInstance[1].instanceId())
.build(),
ServiceRouteEntryPublishToInstanceArgs.builder()
.instanceRegionId("cn-beijing")
.instanceType("VPC")
.instanceId(fooAttachInstance[2].instanceId())
.build())
.build());
final var fooServiceRouteEntries = CenFunctions.ServiceRouteEntries(ServiceRouteEntriesArgs.builder()
.cenId(fooCen.id())
.destinationCidrBlock(fooServiceRouteEntry.destinationCidrBlock())
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_vpc = []
for range in [{"value": i} for i in range(0, 3)]:
foo_vpc.append(volcengine.vpc.Vpc(f"fooVpc-{range['value']}",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16"))
foo_cen = volcengine.cen.Cen("fooCen",
cen_name="acc-test-cen",
description="acc-test",
project_name="default",
tags=[volcengine.cen.CenTagArgs(
key="k1",
value="v1",
)])
foo_attach_instance = []
for range in [{"value": i} for i in range(0, 3)]:
foo_attach_instance.append(volcengine.cen.AttachInstance(f"fooAttachInstance-{range['value']}",
cen_id=foo_cen.id,
instance_id=foo_vpc[range["value"]].id,
instance_region_id="cn-beijing",
instance_type="VPC"))
foo_service_route_entry = volcengine.cen.ServiceRouteEntry("fooServiceRouteEntry",
cen_id=foo_cen.id,
destination_cidr_block="100.64.0.0/11",
service_region_id="cn-beijing",
service_vpc_id=foo_attach_instance[0].instance_id,
description="acc-test",
publish_mode="Custom",
publish_to_instances=[
volcengine.cen.ServiceRouteEntryPublishToInstanceArgs(
instance_region_id="cn-beijing",
instance_type="VPC",
instance_id=foo_attach_instance[1].instance_id,
),
volcengine.cen.ServiceRouteEntryPublishToInstanceArgs(
instance_region_id="cn-beijing",
instance_type="VPC",
instance_id=foo_attach_instance[2].instance_id,
),
])
foo_service_route_entries = volcengine.cen.service_route_entries_output(cen_id=foo_cen.id,
destination_cidr_block=foo_service_route_entry.destination_cidr_block)
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooVpc: volcengine.vpc.Vpc[] = [];
for (const range = {value: 0}; range.value < 3; range.value++) {
fooVpc.push(new volcengine.vpc.Vpc(`fooVpc-${range.value}`, {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
}));
}
const fooCen = new volcengine.cen.Cen("fooCen", {
cenName: "acc-test-cen",
description: "acc-test",
projectName: "default",
tags: [{
key: "k1",
value: "v1",
}],
});
const fooAttachInstance: volcengine.cen.AttachInstance[] = [];
for (const range = {value: 0}; range.value < 3; range.value++) {
fooAttachInstance.push(new volcengine.cen.AttachInstance(`fooAttachInstance-${range.value}`, {
cenId: fooCen.id,
instanceId: fooVpc[range.value].id,
instanceRegionId: "cn-beijing",
instanceType: "VPC",
}));
}
const fooServiceRouteEntry = new volcengine.cen.ServiceRouteEntry("fooServiceRouteEntry", {
cenId: fooCen.id,
destinationCidrBlock: "100.64.0.0/11",
serviceRegionId: "cn-beijing",
serviceVpcId: fooAttachInstance[0].instanceId,
description: "acc-test",
publishMode: "Custom",
publishToInstances: [
{
instanceRegionId: "cn-beijing",
instanceType: "VPC",
instanceId: fooAttachInstance[1].instanceId,
},
{
instanceRegionId: "cn-beijing",
instanceType: "VPC",
instanceId: fooAttachInstance[2].instanceId,
},
],
});
const fooServiceRouteEntries = volcengine.cen.ServiceRouteEntriesOutput({
cenId: fooCen.id,
destinationCidrBlock: fooServiceRouteEntry.destinationCidrBlock,
});
Coming soon!
Using ServiceRouteEntries
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function serviceRouteEntries(args: ServiceRouteEntriesArgs, opts?: InvokeOptions): Promise<ServiceRouteEntriesResult>
function serviceRouteEntriesOutput(args: ServiceRouteEntriesOutputArgs, opts?: InvokeOptions): Output<ServiceRouteEntriesResult>
def service_route_entries(cen_id: Optional[str] = None,
destination_cidr_block: Optional[str] = None,
output_file: Optional[str] = None,
service_region_id: Optional[str] = None,
service_vpc_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> ServiceRouteEntriesResult
def service_route_entries_output(cen_id: Optional[pulumi.Input[str]] = None,
destination_cidr_block: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
service_region_id: Optional[pulumi.Input[str]] = None,
service_vpc_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[ServiceRouteEntriesResult]
func ServiceRouteEntries(ctx *Context, args *ServiceRouteEntriesArgs, opts ...InvokeOption) (*ServiceRouteEntriesResult, error)
func ServiceRouteEntriesOutput(ctx *Context, args *ServiceRouteEntriesOutputArgs, opts ...InvokeOption) ServiceRouteEntriesResultOutput
public static class ServiceRouteEntries
{
public static Task<ServiceRouteEntriesResult> InvokeAsync(ServiceRouteEntriesArgs args, InvokeOptions? opts = null)
public static Output<ServiceRouteEntriesResult> Invoke(ServiceRouteEntriesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<ServiceRouteEntriesResult> serviceRouteEntries(ServiceRouteEntriesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: volcengine:cen:ServiceRouteEntries
arguments:
# arguments dictionary
The following arguments are supported:
- Cen
Id string - A cen ID.
- Destination
Cidr stringBlock - A destination cidr block.
- Output
File string - File name where to save data source results.
- Service
Region stringId - A service region id.
- Service
Vpc stringId - A service VPC id.
- Cen
Id string - A cen ID.
- Destination
Cidr stringBlock - A destination cidr block.
- Output
File string - File name where to save data source results.
- Service
Region stringId - A service region id.
- Service
Vpc stringId - A service VPC id.
- cen
Id String - A cen ID.
- destination
Cidr StringBlock - A destination cidr block.
- output
File String - File name where to save data source results.
- service
Region StringId - A service region id.
- service
Vpc StringId - A service VPC id.
- cen
Id string - A cen ID.
- destination
Cidr stringBlock - A destination cidr block.
- output
File string - File name where to save data source results.
- service
Region stringId - A service region id.
- service
Vpc stringId - A service VPC id.
- cen_
id str - A cen ID.
- destination_
cidr_ strblock - A destination cidr block.
- output_
file str - File name where to save data source results.
- service_
region_ strid - A service region id.
- service_
vpc_ strid - A service VPC id.
- cen
Id String - A cen ID.
- destination
Cidr StringBlock - A destination cidr block.
- output
File String - File name where to save data source results.
- service
Region StringId - A service region id.
- service
Vpc StringId - A service VPC id.
ServiceRouteEntries Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Route List<ServiceEntries Route Entries Service Route Entry> - The collection of cen service route entry query.
- Total
Count int - The total count of cen service route entry.
- Cen
Id string - The cen ID of the cen service route entry.
- Destination
Cidr stringBlock - The destination cidr block of the cen service route entry.
- Output
File string - Service
Region stringId - The service region id of the cen service route entry.
- Service
Vpc stringId - The service VPC id of the cen service route entry.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Route []ServiceEntries Route Entries Service Route Entry - The collection of cen service route entry query.
- Total
Count int - The total count of cen service route entry.
- Cen
Id string - The cen ID of the cen service route entry.
- Destination
Cidr stringBlock - The destination cidr block of the cen service route entry.
- Output
File string - Service
Region stringId - The service region id of the cen service route entry.
- Service
Vpc stringId - The service VPC id of the cen service route entry.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Route List<ServiceEntries Route Entries Service Route Entry> - The collection of cen service route entry query.
- total
Count Integer - The total count of cen service route entry.
- cen
Id String - The cen ID of the cen service route entry.
- destination
Cidr StringBlock - The destination cidr block of the cen service route entry.
- output
File String - service
Region StringId - The service region id of the cen service route entry.
- service
Vpc StringId - The service VPC id of the cen service route entry.
- id string
- The provider-assigned unique ID for this managed resource.
- service
Route ServiceEntries Route Entries Service Route Entry[] - The collection of cen service route entry query.
- total
Count number - The total count of cen service route entry.
- cen
Id string - The cen ID of the cen service route entry.
- destination
Cidr stringBlock - The destination cidr block of the cen service route entry.
- output
File string - service
Region stringId - The service region id of the cen service route entry.
- service
Vpc stringId - The service VPC id of the cen service route entry.
- id str
- The provider-assigned unique ID for this managed resource.
- service_
route_ Sequence[Serviceentries Route Entries Service Route Entry] - The collection of cen service route entry query.
- total_
count int - The total count of cen service route entry.
- cen_
id str - The cen ID of the cen service route entry.
- destination_
cidr_ strblock - The destination cidr block of the cen service route entry.
- output_
file str - service_
region_ strid - The service region id of the cen service route entry.
- service_
vpc_ strid - The service VPC id of the cen service route entry.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Route List<Property Map>Entries - The collection of cen service route entry query.
- total
Count Number - The total count of cen service route entry.
- cen
Id String - The cen ID of the cen service route entry.
- destination
Cidr StringBlock - The destination cidr block of the cen service route entry.
- output
File String - service
Region StringId - The service region id of the cen service route entry.
- service
Vpc StringId - The service VPC id of the cen service route entry.
Supporting Types
ServiceRouteEntriesServiceRouteEntry
- Cen
Id string - A cen ID.
- Creation
Time string - The create time of the cen service route entry.
- Description string
- The description of the cen service route entry.
- Destination
Cidr stringBlock - A destination cidr block.
- Publish
Mode string - Publishing scope of cloud service access routes. Valid values are
LocalDCGW
(default),Custom
. - Publish
To List<ServiceInstances Route Entries Service Route Entry Publish To Instance> - The publish instances. A maximum of 100 can be uploaded in one request.
- Service
Region stringId - A service region id.
- Service
Vpc stringId - A service VPC id.
- Status string
- The status of the cen service route entry.
- Cen
Id string - A cen ID.
- Creation
Time string - The create time of the cen service route entry.
- Description string
- The description of the cen service route entry.
- Destination
Cidr stringBlock - A destination cidr block.
- Publish
Mode string - Publishing scope of cloud service access routes. Valid values are
LocalDCGW
(default),Custom
. - Publish
To []ServiceInstances Route Entries Service Route Entry Publish To Instance - The publish instances. A maximum of 100 can be uploaded in one request.
- Service
Region stringId - A service region id.
- Service
Vpc stringId - A service VPC id.
- Status string
- The status of the cen service route entry.
- cen
Id String - A cen ID.
- creation
Time String - The create time of the cen service route entry.
- description String
- The description of the cen service route entry.
- destination
Cidr StringBlock - A destination cidr block.
- publish
Mode String - Publishing scope of cloud service access routes. Valid values are
LocalDCGW
(default),Custom
. - publish
To List<ServiceInstances Route Entries Service Route Entry Publish To Instance> - The publish instances. A maximum of 100 can be uploaded in one request.
- service
Region StringId - A service region id.
- service
Vpc StringId - A service VPC id.
- status String
- The status of the cen service route entry.
- cen
Id string - A cen ID.
- creation
Time string - The create time of the cen service route entry.
- description string
- The description of the cen service route entry.
- destination
Cidr stringBlock - A destination cidr block.
- publish
Mode string - Publishing scope of cloud service access routes. Valid values are
LocalDCGW
(default),Custom
. - publish
To ServiceInstances Route Entries Service Route Entry Publish To Instance[] - The publish instances. A maximum of 100 can be uploaded in one request.
- service
Region stringId - A service region id.
- service
Vpc stringId - A service VPC id.
- status string
- The status of the cen service route entry.
- cen_
id str - A cen ID.
- creation_
time str - The create time of the cen service route entry.
- description str
- The description of the cen service route entry.
- destination_
cidr_ strblock - A destination cidr block.
- publish_
mode str - Publishing scope of cloud service access routes. Valid values are
LocalDCGW
(default),Custom
. - publish_
to_ Sequence[Serviceinstances Route Entries Service Route Entry Publish To Instance] - The publish instances. A maximum of 100 can be uploaded in one request.
- service_
region_ strid - A service region id.
- service_
vpc_ strid - A service VPC id.
- status str
- The status of the cen service route entry.
- cen
Id String - A cen ID.
- creation
Time String - The create time of the cen service route entry.
- description String
- The description of the cen service route entry.
- destination
Cidr StringBlock - A destination cidr block.
- publish
Mode String - Publishing scope of cloud service access routes. Valid values are
LocalDCGW
(default),Custom
. - publish
To List<Property Map>Instances - The publish instances. A maximum of 100 can be uploaded in one request.
- service
Region StringId - A service region id.
- service
Vpc StringId - A service VPC id.
- status String
- The status of the cen service route entry.
ServiceRouteEntriesServiceRouteEntryPublishToInstance
- Instance
Id string - Cloud service access routes need to publish the network instance ID.
- Instance
Region stringId - The region where the cloud service access route needs to be published.
- Instance
Type string - The network instance type that needs to be published for cloud service access routes. The values are as follows:
VPC
,DCGW
.
- Instance
Id string - Cloud service access routes need to publish the network instance ID.
- Instance
Region stringId - The region where the cloud service access route needs to be published.
- Instance
Type string - The network instance type that needs to be published for cloud service access routes. The values are as follows:
VPC
,DCGW
.
- instance
Id String - Cloud service access routes need to publish the network instance ID.
- instance
Region StringId - The region where the cloud service access route needs to be published.
- instance
Type String - The network instance type that needs to be published for cloud service access routes. The values are as follows:
VPC
,DCGW
.
- instance
Id string - Cloud service access routes need to publish the network instance ID.
- instance
Region stringId - The region where the cloud service access route needs to be published.
- instance
Type string - The network instance type that needs to be published for cloud service access routes. The values are as follows:
VPC
,DCGW
.
- instance_
id str - Cloud service access routes need to publish the network instance ID.
- instance_
region_ strid - The region where the cloud service access route needs to be published.
- instance_
type str - The network instance type that needs to be published for cloud service access routes. The values are as follows:
VPC
,DCGW
.
- instance
Id String - Cloud service access routes need to publish the network instance ID.
- instance
Region StringId - The region where the cloud service access route needs to be published.
- instance
Type String - The network instance type that needs to be published for cloud service access routes. The values are as follows:
VPC
,DCGW
.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.