Getting Started with Terraform and OCI (Oracle Cloud) Part 1: Creating Network Resources
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
- Create a free OCI account at https://www.oracle.com/cloud/free
- Configuring our OCI credentials to use Terraform → How to Configure the Terraform Provider for OCI (Oracle Cloud Infrastructure) with API Key Authentication