Skip to content

CloudAstro/terraform-opentelekomcloud-vpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenTelekomCloud VPC Terraform Module

Changelog Notice Apache V2 License OpenTofu Registry

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.

Features

  • 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.

Example Usage

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"
  }
}

Requirements

Name Version
terraform ~> 1.9.0
opentelekomcloud >= 1.36.35

Providers

Name Version
opentelekomcloud >= 1.36.35

Resources

Name Type
opentelekomcloud_vpc_v1.vpc_v1 resource

Inputs

Name Description Type Default Required
cidr * cidr - (Required) The range of available subnets in the VPC. The value ranges from
10.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 of
no 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 = {
foo = "bar"
key = "value"
}
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 = {
create = "1m"
delete = "1m"
}
object({
create = optional(string)
delete = optional(string)
})
null no

Outputs

Name Description
vpc_v1 Example output:
output "name" {
value = module.module_name.vpc_v1.name
}

Modules

No modules.

🌐 Additional Information

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.

📚 Resources

⚠️ Notes

  • 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.

🧾 License

This module is released under the Apache 2.0 License. See the LICENSE file for full details.

About

Terraform Module for Open Telekom Cloud (OTC) VPC

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages