The Terraform VCN for Oracle Cloud Infrastructure provides a reusable Terraform module that provisions a minimal VCN on OCI.
It creates the following resources:
- A VCN with one or more customizable CIDR blocks
- An optional internet gateway and a route table
- An optional NAT gateway
- An optional service gateway
- An optional dynamic routing gateway [Deprecated; use drg submodule instead]
- An optional remote peering connection [Deprecated; use drg submodule instead]
- One or more optional Local Peering Gateways in requestor or acceptor mode, and possibilities to associate a Route Table
It also controls the Default Security List, with a Lockdown mode that can be enabled or disabled.
Custom route rules can be added to the two route tables created by the module.
This module is primarily meant to be reusable to create more advanced infrastructure on OCI either manually in the OCI Console or by extending the Terraform code.
- Oracle Cloud Infrastructure Documentation
- Terraform OCI Provider Documentation
- Erik Berg on Networks, Subnets and CIDR
- Lisa Hagemann on Terraform cidrsubnet Deconstructed
View the CHANGELOG.
Code derived and adapted from Terraform OCI Examples and Hashicorp's Terraform 0.12 examples
Folks who contributed with explanations, code, feedback, ideas, testing etc.
Learn how to contribute.
Copyright (c) 2019, 2021 Oracle and/or its associates.
Licensed under the Universal Permissive License 1.0 as shown at https://oss.oracle.com/licenses/upl.