Viewing docs for opentelekomcloud 1.36.60
published on Thursday, Feb 26, 2026 by opentelekomcloud
published on Thursday, Feb 26, 2026 by opentelekomcloud
Viewing docs for opentelekomcloud 1.36.60
published on Thursday, Feb 26, 2026 by opentelekomcloud
published on Thursday, Feb 26, 2026 by opentelekomcloud
Up-to-date reference of API arguments for VPC you can get at documentation portal
Use this data source to get details about a specific VPC.
This data source can prove useful when a module accepts a VPC id as an input variable and needs to, for example, determine the CIDR block of that VPC.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const vpcName = config.requireObject<any>("vpcName");
const vpc = opentelekomcloud.getVpcV1({
name: vpcName,
shared: true,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
vpc_name = config.require_object("vpcName")
vpc = opentelekomcloud.get_vpc_v1(name=vpc_name,
shared=True)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
vpcName := cfg.RequireObject("vpcName")
_, err := opentelekomcloud.LookupVpcV1(ctx, &opentelekomcloud.LookupVpcV1Args{
Name: pulumi.StringRef(vpcName),
Shared: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var vpcName = config.RequireObject<dynamic>("vpcName");
var vpc = Opentelekomcloud.GetVpcV1.Invoke(new()
{
Name = vpcName,
Shared = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
import com.pulumi.opentelekomcloud.inputs.GetVpcV1Args;
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) {
final var config = ctx.config();
final var vpcName = config.get("vpcName");
final var vpc = OpentelekomcloudFunctions.getVpcV1(GetVpcV1Args.builder()
.name(vpcName)
.shared(true)
.build());
}
}
configuration:
vpcName:
type: dynamic
variables:
vpc:
fn::invoke:
function: opentelekomcloud:getVpcV1
arguments:
name: ${vpcName}
shared: true
Using getVpcV1
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 getVpcV1(args: GetVpcV1Args, opts?: InvokeOptions): Promise<GetVpcV1Result>
function getVpcV1Output(args: GetVpcV1OutputArgs, opts?: InvokeOptions): Output<GetVpcV1Result>def get_vpc_v1(cidr: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
shared: Optional[bool] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVpcV1Result
def get_vpc_v1_output(cidr: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
shared: Optional[pulumi.Input[bool]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVpcV1Result]func LookupVpcV1(ctx *Context, args *LookupVpcV1Args, opts ...InvokeOption) (*LookupVpcV1Result, error)
func LookupVpcV1Output(ctx *Context, args *LookupVpcV1OutputArgs, opts ...InvokeOption) LookupVpcV1ResultOutput> Note: This function is named LookupVpcV1 in the Go SDK.
public static class GetVpcV1
{
public static Task<GetVpcV1Result> InvokeAsync(GetVpcV1Args args, InvokeOptions? opts = null)
public static Output<GetVpcV1Result> Invoke(GetVpcV1InvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVpcV1Result> getVpcV1(GetVpcV1Args args, InvokeOptions options)
public static Output<GetVpcV1Result> getVpcV1(GetVpcV1Args args, InvokeOptions options)
fn::invoke:
function: opentelekomcloud:index/getVpcV1:getVpcV1
arguments:
# arguments dictionaryThe following arguments are supported:
- Cidr string
- The cidr block of the desired VPC.
- Id string
- The id of the specific VPC to retrieve.
- Name string
- A unique name for the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
- Region string
- bool
- Enable SNAT (In order to let instances without an EIP access the internet).
- Status string
- The current status of the desired VPC.
Can be either
CREATING,OK,DOWN,PENDING_UPDATE,PENDING_DELETE, orERROR.
- Cidr string
- The cidr block of the desired VPC.
- Id string
- The id of the specific VPC to retrieve.
- Name string
- A unique name for the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
- Region string
- bool
- Enable SNAT (In order to let instances without an EIP access the internet).
- Status string
- The current status of the desired VPC.
Can be either
CREATING,OK,DOWN,PENDING_UPDATE,PENDING_DELETE, orERROR.
- cidr String
- The cidr block of the desired VPC.
- id String
- The id of the specific VPC to retrieve.
- name String
- A unique name for the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
- region String
- Boolean
- Enable SNAT (In order to let instances without an EIP access the internet).
- status String
- The current status of the desired VPC.
Can be either
CREATING,OK,DOWN,PENDING_UPDATE,PENDING_DELETE, orERROR.
- cidr string
- The cidr block of the desired VPC.
- id string
- The id of the specific VPC to retrieve.
- name string
- A unique name for the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
- region string
- boolean
- Enable SNAT (In order to let instances without an EIP access the internet).
- status string
- The current status of the desired VPC.
Can be either
CREATING,OK,DOWN,PENDING_UPDATE,PENDING_DELETE, orERROR.
- cidr str
- The cidr block of the desired VPC.
- id str
- The id of the specific VPC to retrieve.
- name str
- A unique name for the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
- region str
- bool
- Enable SNAT (In order to let instances without an EIP access the internet).
- status str
- The current status of the desired VPC.
Can be either
CREATING,OK,DOWN,PENDING_UPDATE,PENDING_DELETE, orERROR.
- cidr String
- The cidr block of the desired VPC.
- id String
- The id of the specific VPC to retrieve.
- name String
- A unique name for the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
- region String
- Boolean
- Enable SNAT (In order to let instances without an EIP access the internet).
- status String
- The current status of the desired VPC.
Can be either
CREATING,OK,DOWN,PENDING_UPDATE,PENDING_DELETE, orERROR.
getVpcV1 Result
The following output properties are available:
- Region string
- Routes
List<Get
Vpc V1Route> - The list of route information with
destinationandnexthopfields. - Cidr string
- See Argument Reference above.
- Id string
- ID of the VPC.
- Name string
- See Argument Reference above.
- bool
- Specifies whether the cross-tenant sharing is supported.
- Status string
- See Argument Reference above.
- Region string
- Routes
[]Get
Vpc V1Route - The list of route information with
destinationandnexthopfields. - Cidr string
- See Argument Reference above.
- Id string
- ID of the VPC.
- Name string
- See Argument Reference above.
- bool
- Specifies whether the cross-tenant sharing is supported.
- Status string
- See Argument Reference above.
- region String
- routes
List<Get
Vpc V1Route> - The list of route information with
destinationandnexthopfields. - cidr String
- See Argument Reference above.
- id String
- ID of the VPC.
- name String
- See Argument Reference above.
- Boolean
- Specifies whether the cross-tenant sharing is supported.
- status String
- See Argument Reference above.
- region string
- routes
Get
Vpc V1Route[] - The list of route information with
destinationandnexthopfields. - cidr string
- See Argument Reference above.
- id string
- ID of the VPC.
- name string
- See Argument Reference above.
- boolean
- Specifies whether the cross-tenant sharing is supported.
- status string
- See Argument Reference above.
- region str
- routes
Sequence[Get
Vpc V1Route] - The list of route information with
destinationandnexthopfields. - cidr str
- See Argument Reference above.
- id str
- ID of the VPC.
- name str
- See Argument Reference above.
- bool
- Specifies whether the cross-tenant sharing is supported.
- status str
- See Argument Reference above.
- region String
- routes List<Property Map>
- The list of route information with
destinationandnexthopfields. - cidr String
- See Argument Reference above.
- id String
- ID of the VPC.
- name String
- See Argument Reference above.
- Boolean
- Specifies whether the cross-tenant sharing is supported.
- status String
- See Argument Reference above.
Supporting Types
GetVpcV1Route
- Destination string
- Nexthop string
- Destination string
- Nexthop string
- destination String
- nexthop String
- destination string
- nexthop string
- destination str
- nexthop str
- destination String
- nexthop String
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloudTerraform Provider.
Viewing docs for opentelekomcloud 1.36.60
published on Thursday, Feb 26, 2026 by opentelekomcloud
published on Thursday, Feb 26, 2026 by opentelekomcloud
