Getting Started with Terraform and OCI (Oracle Cloud) Part 1: Creating Network Resources

Guillermo Musumeci
8 min readJan 4, 2023

Terraform is the most popular Infrastructure as Code (IaC) tool in the market, and in this Getting Starting with Terraform and OCI series, we will learn how to write Terraform code to automate our cloud infrastructure in Oracle Cloud.

  • Part 1: Deploying network resources in OCI — this story
  • Part 2: Implementing Security List and Network Security Group (NSG) — coming soon

In this story, we will take a look at the following subjects:

  • Define the OCI Provider for Terraform
  • Create a Compartment
  • Create a Virtual Cloud Network (VCN)
  • Create Private and Public Subnets
  • Deploy an Internet Gateway
  • Deploy a NAT Gateway
  • Create Route Tables
  • Create DHCP Options

1. Requirements

2. Defining the OCI Provider

--

--

Guillermo Musumeci

Certified AWS, Azure & GCP Architect | HashiCorp Ambassador | Terraform SME | KopiCloud Founder | ex-AWS | Entrepreneur | Book Author | Husband & Dad of ✌