Skip to content

Terraform VCN for Oracle Cloud Infrastructure

The Terraform VCN for Oracle Cloud Infrastructure (OCI) 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
  • One or more optional Local Peering Gateways in requestor or acceptor mode, with the possibility to associate a Route Table

When enable_ipv6 = true, the module also provisions IPv6 support: Oracle-assigned GUA, BYOIPv6 and/or private IPv6 CIDR blocks, IPv6 rules in the Default Security List, and a dual-stack route table (nat_ipv4_igw_ipv6) that routes IPv4 through the NAT Gateway and IPv6 through the Internet Gateway.

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.

Instructions

Related Documentation, Blog

Projects using this module

Changelog

View the CHANGELOG.

Acknowledgement

Code derived and adapted from Terraform OCI Examples and Hashicorp's Terraform 0.12 examples

Contributors

Folks who contributed with explanations, code, feedback, ideas, testing etc.

Learn how to contribute.

License

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.

About

A reusable and extensible Terraform module that provisions a VCN on Oracle Cloud Infrastructure

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

42 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages