published on Thursday, May 21, 2026 by opentelekomcloud
published on Thursday, May 21, 2026 by opentelekomcloud
Up-to-date reference of API arguments for VPC secondary CIDR block management you can get at documentation portal
Manages up to 5 secondary CIDR blocks attached to an existing VPC via the VPC v3 API.
Warning: Each VPC has a single shared
extend_cidrslist in the cloud. Define at most oneopentelekomcloud.VpcSecondaryCidrV3resource per VPC, and do not combine it with thesecondary_cidrattribute onopentelekomcloud.VpcV1against the same VPC which will be soon deprecated. Multiple resources targeting the samevpc_idwill fight on every plan, because each resource reads back the full cloud-side list and tries to reconcile it to its own subset.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const vpc = new opentelekomcloud.VpcV1("vpc", {
name: "tf_vpc",
cidr: "192.168.0.0/16",
});
const secondary = new opentelekomcloud.VpcSecondaryCidrV3("secondary", {
vpcId: vpc.vpcV1Id,
cidrs: [
"23.9.0.0/16",
"23.10.0.0/16",
"23.11.0.0/16",
],
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
vpc = opentelekomcloud.VpcV1("vpc",
name="tf_vpc",
cidr="192.168.0.0/16")
secondary = opentelekomcloud.VpcSecondaryCidrV3("secondary",
vpc_id=vpc.vpc_v1_id,
cidrs=[
"23.9.0.0/16",
"23.10.0.0/16",
"23.11.0.0/16",
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
vpc, err := opentelekomcloud.NewVpcV1(ctx, "vpc", &opentelekomcloud.VpcV1Args{
Name: pulumi.String("tf_vpc"),
Cidr: pulumi.String("192.168.0.0/16"),
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewVpcSecondaryCidrV3(ctx, "secondary", &opentelekomcloud.VpcSecondaryCidrV3Args{
VpcId: vpc.VpcV1Id,
Cidrs: pulumi.StringArray{
pulumi.String("23.9.0.0/16"),
pulumi.String("23.10.0.0/16"),
pulumi.String("23.11.0.0/16"),
},
})
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 vpc = new Opentelekomcloud.VpcV1("vpc", new()
{
Name = "tf_vpc",
Cidr = "192.168.0.0/16",
});
var secondary = new Opentelekomcloud.VpcSecondaryCidrV3("secondary", new()
{
VpcId = vpc.VpcV1Id,
Cidrs = new[]
{
"23.9.0.0/16",
"23.10.0.0/16",
"23.11.0.0/16",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.VpcV1;
import com.pulumi.opentelekomcloud.VpcV1Args;
import com.pulumi.opentelekomcloud.VpcSecondaryCidrV3;
import com.pulumi.opentelekomcloud.VpcSecondaryCidrV3Args;
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 vpc = new VpcV1("vpc", VpcV1Args.builder()
.name("tf_vpc")
.cidr("192.168.0.0/16")
.build());
var secondary = new VpcSecondaryCidrV3("secondary", VpcSecondaryCidrV3Args.builder()
.vpcId(vpc.vpcV1Id())
.cidrs(
"23.9.0.0/16",
"23.10.0.0/16",
"23.11.0.0/16")
.build());
}
}
resources:
vpc:
type: opentelekomcloud:VpcV1
properties:
name: tf_vpc
cidr: 192.168.0.0/16
secondary:
type: opentelekomcloud:VpcSecondaryCidrV3
properties:
vpcId: ${vpc.vpcV1Id}
cidrs:
- 23.9.0.0/16
- 23.10.0.0/16
- 23.11.0.0/16
Example coming soon!
Create VpcSecondaryCidrV3 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpcSecondaryCidrV3(name: string, args: VpcSecondaryCidrV3Args, opts?: CustomResourceOptions);@overload
def VpcSecondaryCidrV3(resource_name: str,
args: VpcSecondaryCidrV3Args,
opts: Optional[ResourceOptions] = None)
@overload
def VpcSecondaryCidrV3(resource_name: str,
opts: Optional[ResourceOptions] = None,
cidrs: Optional[Sequence[str]] = None,
vpc_id: Optional[str] = None,
vpc_secondary_cidr_v3_id: Optional[str] = None)func NewVpcSecondaryCidrV3(ctx *Context, name string, args VpcSecondaryCidrV3Args, opts ...ResourceOption) (*VpcSecondaryCidrV3, error)public VpcSecondaryCidrV3(string name, VpcSecondaryCidrV3Args args, CustomResourceOptions? opts = null)
public VpcSecondaryCidrV3(String name, VpcSecondaryCidrV3Args args)
public VpcSecondaryCidrV3(String name, VpcSecondaryCidrV3Args args, CustomResourceOptions options)
type: opentelekomcloud:VpcSecondaryCidrV3
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "opentelekomcloud_vpcsecondarycidrv3" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args VpcSecondaryCidrV3Args
- 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 VpcSecondaryCidrV3Args
- 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 VpcSecondaryCidrV3Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcSecondaryCidrV3Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpcSecondaryCidrV3Args
- 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 vpcSecondaryCidrV3Resource = new Opentelekomcloud.VpcSecondaryCidrV3("vpcSecondaryCidrV3Resource", new()
{
Cidrs = new[]
{
"string",
},
VpcId = "string",
VpcSecondaryCidrV3Id = "string",
});
example, err := opentelekomcloud.NewVpcSecondaryCidrV3(ctx, "vpcSecondaryCidrV3Resource", &opentelekomcloud.VpcSecondaryCidrV3Args{
Cidrs: pulumi.StringArray{
pulumi.String("string"),
},
VpcId: pulumi.String("string"),
VpcSecondaryCidrV3Id: pulumi.String("string"),
})
resource "opentelekomcloud_vpcsecondarycidrv3" "vpcSecondaryCidrV3Resource" {
cidrs = ["string"]
vpc_id = "string"
vpc_secondary_cidr_v3_id = "string"
}
var vpcSecondaryCidrV3Resource = new VpcSecondaryCidrV3("vpcSecondaryCidrV3Resource", VpcSecondaryCidrV3Args.builder()
.cidrs("string")
.vpcId("string")
.vpcSecondaryCidrV3Id("string")
.build());
vpc_secondary_cidr_v3_resource = opentelekomcloud.VpcSecondaryCidrV3("vpcSecondaryCidrV3Resource",
cidrs=["string"],
vpc_id="string",
vpc_secondary_cidr_v3_id="string")
const vpcSecondaryCidrV3Resource = new opentelekomcloud.VpcSecondaryCidrV3("vpcSecondaryCidrV3Resource", {
cidrs: ["string"],
vpcId: "string",
vpcSecondaryCidrV3Id: "string",
});
type: opentelekomcloud:VpcSecondaryCidrV3
properties:
cidrs:
- string
vpcId: string
vpcSecondaryCidrV3Id: string
VpcSecondaryCidrV3 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 VpcSecondaryCidrV3 resource accepts the following input properties:
- Cidrs List<string>
- Set of secondary CIDR blocks to attach to the VPC.
At least 1 and at most 5 entries are supported. Each entry must be a valid
IPv4 CIDR. The cloud rejects reserved ranges (for example
100.64.0.0/10,214.0.0.0/7,198.18.0.0/15,169.254.0.0/16,0.0.0.0/8,127.0.0.0/8,240.0.0.0/4,172.31.0.0/16,192.168.0.0/16); these checks are enforced server-side. - Vpc
Id string - The ID of the VPC to which the secondary CIDR blocks are attached. Changing this forces a new resource to be created.
- Vpc
Secondary stringCidr V3Id - The ID of the resource. Equal to the
vpc_idbecause each VPC has a single set of secondary CIDR blocks.
- Cidrs []string
- Set of secondary CIDR blocks to attach to the VPC.
At least 1 and at most 5 entries are supported. Each entry must be a valid
IPv4 CIDR. The cloud rejects reserved ranges (for example
100.64.0.0/10,214.0.0.0/7,198.18.0.0/15,169.254.0.0/16,0.0.0.0/8,127.0.0.0/8,240.0.0.0/4,172.31.0.0/16,192.168.0.0/16); these checks are enforced server-side. - Vpc
Id string - The ID of the VPC to which the secondary CIDR blocks are attached. Changing this forces a new resource to be created.
- Vpc
Secondary stringCidr V3Id - The ID of the resource. Equal to the
vpc_idbecause each VPC has a single set of secondary CIDR blocks.
- cidrs list(string)
- Set of secondary CIDR blocks to attach to the VPC.
At least 1 and at most 5 entries are supported. Each entry must be a valid
IPv4 CIDR. The cloud rejects reserved ranges (for example
100.64.0.0/10,214.0.0.0/7,198.18.0.0/15,169.254.0.0/16,0.0.0.0/8,127.0.0.0/8,240.0.0.0/4,172.31.0.0/16,192.168.0.0/16); these checks are enforced server-side. - vpc_
id string - The ID of the VPC to which the secondary CIDR blocks are attached. Changing this forces a new resource to be created.
- vpc_
secondary_ stringcidr_ v3_ id - The ID of the resource. Equal to the
vpc_idbecause each VPC has a single set of secondary CIDR blocks.
- cidrs List<String>
- Set of secondary CIDR blocks to attach to the VPC.
At least 1 and at most 5 entries are supported. Each entry must be a valid
IPv4 CIDR. The cloud rejects reserved ranges (for example
100.64.0.0/10,214.0.0.0/7,198.18.0.0/15,169.254.0.0/16,0.0.0.0/8,127.0.0.0/8,240.0.0.0/4,172.31.0.0/16,192.168.0.0/16); these checks are enforced server-side. - vpc
Id String - The ID of the VPC to which the secondary CIDR blocks are attached. Changing this forces a new resource to be created.
- vpc
Secondary StringCidr V3Id - The ID of the resource. Equal to the
vpc_idbecause each VPC has a single set of secondary CIDR blocks.
- cidrs string[]
- Set of secondary CIDR blocks to attach to the VPC.
At least 1 and at most 5 entries are supported. Each entry must be a valid
IPv4 CIDR. The cloud rejects reserved ranges (for example
100.64.0.0/10,214.0.0.0/7,198.18.0.0/15,169.254.0.0/16,0.0.0.0/8,127.0.0.0/8,240.0.0.0/4,172.31.0.0/16,192.168.0.0/16); these checks are enforced server-side. - vpc
Id string - The ID of the VPC to which the secondary CIDR blocks are attached. Changing this forces a new resource to be created.
- vpc
Secondary stringCidr V3Id - The ID of the resource. Equal to the
vpc_idbecause each VPC has a single set of secondary CIDR blocks.
- cidrs Sequence[str]
- Set of secondary CIDR blocks to attach to the VPC.
At least 1 and at most 5 entries are supported. Each entry must be a valid
IPv4 CIDR. The cloud rejects reserved ranges (for example
100.64.0.0/10,214.0.0.0/7,198.18.0.0/15,169.254.0.0/16,0.0.0.0/8,127.0.0.0/8,240.0.0.0/4,172.31.0.0/16,192.168.0.0/16); these checks are enforced server-side. - vpc_
id str - The ID of the VPC to which the secondary CIDR blocks are attached. Changing this forces a new resource to be created.
- vpc_
secondary_ strcidr_ v3_ id - The ID of the resource. Equal to the
vpc_idbecause each VPC has a single set of secondary CIDR blocks.
- cidrs List<String>
- Set of secondary CIDR blocks to attach to the VPC.
At least 1 and at most 5 entries are supported. Each entry must be a valid
IPv4 CIDR. The cloud rejects reserved ranges (for example
100.64.0.0/10,214.0.0.0/7,198.18.0.0/15,169.254.0.0/16,0.0.0.0/8,127.0.0.0/8,240.0.0.0/4,172.31.0.0/16,192.168.0.0/16); these checks are enforced server-side. - vpc
Id String - The ID of the VPC to which the secondary CIDR blocks are attached. Changing this forces a new resource to be created.
- vpc
Secondary StringCidr V3Id - The ID of the resource. Equal to the
vpc_idbecause each VPC has a single set of secondary CIDR blocks.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpcSecondaryCidrV3 resource produces the following output properties:
Look up Existing VpcSecondaryCidrV3 Resource
Get an existing VpcSecondaryCidrV3 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?: VpcSecondaryCidrV3State, opts?: CustomResourceOptions): VpcSecondaryCidrV3@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cidrs: Optional[Sequence[str]] = None,
region: Optional[str] = None,
vpc_id: Optional[str] = None,
vpc_secondary_cidr_v3_id: Optional[str] = None) -> VpcSecondaryCidrV3func GetVpcSecondaryCidrV3(ctx *Context, name string, id IDInput, state *VpcSecondaryCidrV3State, opts ...ResourceOption) (*VpcSecondaryCidrV3, error)public static VpcSecondaryCidrV3 Get(string name, Input<string> id, VpcSecondaryCidrV3State? state, CustomResourceOptions? opts = null)public static VpcSecondaryCidrV3 get(String name, Output<String> id, VpcSecondaryCidrV3State state, CustomResourceOptions options)resources: _: type: opentelekomcloud:VpcSecondaryCidrV3 get: id: ${id}import {
to = opentelekomcloud_vpcsecondarycidrv3.example
id = "${id}"
}
- 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.
- Cidrs List<string>
- Set of secondary CIDR blocks to attach to the VPC.
At least 1 and at most 5 entries are supported. Each entry must be a valid
IPv4 CIDR. The cloud rejects reserved ranges (for example
100.64.0.0/10,214.0.0.0/7,198.18.0.0/15,169.254.0.0/16,0.0.0.0/8,127.0.0.0/8,240.0.0.0/4,172.31.0.0/16,192.168.0.0/16); these checks are enforced server-side. - Region string
- The region in which the secondary CIDRs are managed. Inherited from the provider configuration.
- Vpc
Id string - The ID of the VPC to which the secondary CIDR blocks are attached. Changing this forces a new resource to be created.
- Vpc
Secondary stringCidr V3Id - The ID of the resource. Equal to the
vpc_idbecause each VPC has a single set of secondary CIDR blocks.
- Cidrs []string
- Set of secondary CIDR blocks to attach to the VPC.
At least 1 and at most 5 entries are supported. Each entry must be a valid
IPv4 CIDR. The cloud rejects reserved ranges (for example
100.64.0.0/10,214.0.0.0/7,198.18.0.0/15,169.254.0.0/16,0.0.0.0/8,127.0.0.0/8,240.0.0.0/4,172.31.0.0/16,192.168.0.0/16); these checks are enforced server-side. - Region string
- The region in which the secondary CIDRs are managed. Inherited from the provider configuration.
- Vpc
Id string - The ID of the VPC to which the secondary CIDR blocks are attached. Changing this forces a new resource to be created.
- Vpc
Secondary stringCidr V3Id - The ID of the resource. Equal to the
vpc_idbecause each VPC has a single set of secondary CIDR blocks.
- cidrs list(string)
- Set of secondary CIDR blocks to attach to the VPC.
At least 1 and at most 5 entries are supported. Each entry must be a valid
IPv4 CIDR. The cloud rejects reserved ranges (for example
100.64.0.0/10,214.0.0.0/7,198.18.0.0/15,169.254.0.0/16,0.0.0.0/8,127.0.0.0/8,240.0.0.0/4,172.31.0.0/16,192.168.0.0/16); these checks are enforced server-side. - region string
- The region in which the secondary CIDRs are managed. Inherited from the provider configuration.
- vpc_
id string - The ID of the VPC to which the secondary CIDR blocks are attached. Changing this forces a new resource to be created.
- vpc_
secondary_ stringcidr_ v3_ id - The ID of the resource. Equal to the
vpc_idbecause each VPC has a single set of secondary CIDR blocks.
- cidrs List<String>
- Set of secondary CIDR blocks to attach to the VPC.
At least 1 and at most 5 entries are supported. Each entry must be a valid
IPv4 CIDR. The cloud rejects reserved ranges (for example
100.64.0.0/10,214.0.0.0/7,198.18.0.0/15,169.254.0.0/16,0.0.0.0/8,127.0.0.0/8,240.0.0.0/4,172.31.0.0/16,192.168.0.0/16); these checks are enforced server-side. - region String
- The region in which the secondary CIDRs are managed. Inherited from the provider configuration.
- vpc
Id String - The ID of the VPC to which the secondary CIDR blocks are attached. Changing this forces a new resource to be created.
- vpc
Secondary StringCidr V3Id - The ID of the resource. Equal to the
vpc_idbecause each VPC has a single set of secondary CIDR blocks.
- cidrs string[]
- Set of secondary CIDR blocks to attach to the VPC.
At least 1 and at most 5 entries are supported. Each entry must be a valid
IPv4 CIDR. The cloud rejects reserved ranges (for example
100.64.0.0/10,214.0.0.0/7,198.18.0.0/15,169.254.0.0/16,0.0.0.0/8,127.0.0.0/8,240.0.0.0/4,172.31.0.0/16,192.168.0.0/16); these checks are enforced server-side. - region string
- The region in which the secondary CIDRs are managed. Inherited from the provider configuration.
- vpc
Id string - The ID of the VPC to which the secondary CIDR blocks are attached. Changing this forces a new resource to be created.
- vpc
Secondary stringCidr V3Id - The ID of the resource. Equal to the
vpc_idbecause each VPC has a single set of secondary CIDR blocks.
- cidrs Sequence[str]
- Set of secondary CIDR blocks to attach to the VPC.
At least 1 and at most 5 entries are supported. Each entry must be a valid
IPv4 CIDR. The cloud rejects reserved ranges (for example
100.64.0.0/10,214.0.0.0/7,198.18.0.0/15,169.254.0.0/16,0.0.0.0/8,127.0.0.0/8,240.0.0.0/4,172.31.0.0/16,192.168.0.0/16); these checks are enforced server-side. - region str
- The region in which the secondary CIDRs are managed. Inherited from the provider configuration.
- vpc_
id str - The ID of the VPC to which the secondary CIDR blocks are attached. Changing this forces a new resource to be created.
- vpc_
secondary_ strcidr_ v3_ id - The ID of the resource. Equal to the
vpc_idbecause each VPC has a single set of secondary CIDR blocks.
- cidrs List<String>
- Set of secondary CIDR blocks to attach to the VPC.
At least 1 and at most 5 entries are supported. Each entry must be a valid
IPv4 CIDR. The cloud rejects reserved ranges (for example
100.64.0.0/10,214.0.0.0/7,198.18.0.0/15,169.254.0.0/16,0.0.0.0/8,127.0.0.0/8,240.0.0.0/4,172.31.0.0/16,192.168.0.0/16); these checks are enforced server-side. - region String
- The region in which the secondary CIDRs are managed. Inherited from the provider configuration.
- vpc
Id String - The ID of the VPC to which the secondary CIDR blocks are attached. Changing this forces a new resource to be created.
- vpc
Secondary StringCidr V3Id - The ID of the resource. Equal to the
vpc_idbecause each VPC has a single set of secondary CIDR blocks.
Import
VPC secondary CIDR resources can be imported using the parent VPC id, e.g.
$ pulumi import opentelekomcloud:index/vpcSecondaryCidrV3:VpcSecondaryCidrV3 secondary 7117d38e-4c8f-4624-a505-bd96b97d024c
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloudTerraform Provider.
published on Thursday, May 21, 2026 by opentelekomcloud