This module is designed to manage Virtual Private Clouds (VPCs) within OpenTelekomCloud (OTC). It provides flexible configuration options for VPC creation, including CIDR settings, secondary CIDR blocks, tagging, and customizable timeouts for create and delete operations.
- VPC Management: Automates the creation and management of VPCs in OpenTelekomCloud.
- Custom CIDR Configuration: Supports primary and secondary CIDR block assignment.
- Tagging Support: Allows adding metadata tags to VPC resources.
- Timeout Control: Enables specifying custom create and delete operation timeouts through dynamic configuration.
This example demonstrates how to provision a VPC with optional secondary CIDR blocks and custom timeout settings:
module "vpc" {
source = "../.."
name = "vpc"
description = "description"
cidr = "10.10.0.0/24"
secondary_cidr = "172.16.0.0/24"
region = "eu-de"
tags = {
foo = "bar"
key = "value"
}
}
Name | Version |
---|---|
terraform | ~> 1.9.0 |
opentelekomcloud | >= 1.36.35 |
Name | Version |
---|---|
opentelekomcloud | >= 1.36.35 |
Name | Type |
---|---|
opentelekomcloud_vpc_v1.vpc_v1 | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
cidr | * cidr - (Required) The range of available subnets in the VPC. The value ranges from10.0.0.0/8 to 10.255.255.0/24 , 172.16.0.0/12 to 172.31.255.0/24 ,or 192.168.0.0/16 to 192.168.255.0/24 .Example input: cidr = "10.0.0.0/24" |
string |
n/a | yes |
name | * name - (Required) The name of the VPC. The name must be unique for a tenant. The value is a string ofno more than 64 characters and can contain digits, letters, underscores (_ ), and hyphens (- ).Example input: name = "vpc" |
string |
n/a | yes |
description | * description - (Optional) A description of the VPC.Example input: description = "description" |
string |
null |
no |
region | * region - (Optional) The region in which to create the VPC. If not specified, the provider's default region will be used.Example input: region = "eu-de" |
string |
null |
no |
secondary_cidr | * secondary_cidr - (Optional) Secondary CIDR block that can be added to VPCs.The value cannot contain the following: 100.64.0.0/1 , 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 .Currently, only one secondary CIDR block can be added to each VPC. Example input: secondary_cidr = "172.16.0.0/24" |
string |
null |
no |
tags | * tags - (Optional) The key/value pairs to associate with the VPC.Example input: tags = { |
map(string) |
null |
no |
timeouts | * timeouts - (Optional) A timeouts block. This allows you to specify timeouts for create and delete operations.* create - (Optional) The time to wait for the VPC to be created.* delete - (Optional) The time to wait for the VPC to be deleted.Example input: timeouts = { |
object({ |
null |
no |
Name | Description |
---|---|
vpc_v1 | Example output:output "name" { |
No modules.
This module provides a flexible way to manage Virtual Private Clouds (VPCs) within OpenTelekomCloud, supporting key network features such as multiple CIDR blocks, resource tagging, and customizable operation timeouts. It is designed to be used for both standalone VPC deployments and as a foundation for larger network architectures.
- Terraform OpenTelekomCloud VPC Resource
- OpenTelekomCloud VPC Overview
- Terraform OpenTelekomCloud Provider
- Ensure CIDR blocks do not overlap with existing networks to prevent IP conflicts.
- Secondary CIDR blocks are optional but must be planned carefully for future scalability.
- Tagging can greatly simplify resource management and cost allocation across your cloud environment.
- Be aware of region-specific VPC limitations and quotas in OpenTelekomCloud when designing your architecture.
This module is released under the Apache 2.0 License. See the LICENSE file for full details.