Examples, Templates, and Solutions

The Oracle Cloud Infrastructure (OCI) Terraform provider uses Terraform configuration files to manage your OCI infrastructure.

Referring to existing example configurations, sample solutions, and templates can help you understand HashiCorp Configuration Language format (HCL) and see how it is used to define OCI resources.

You can also modify examples or entire solution sets to meet your needs.

Example Configurations


Quickly create stacks with example OCI Terraform configurations. Go to Terraform Oracle Cloud Infrastructure Provider Examples, navigate to the folder for the configuration you want (such as adm), and then click the Deploy to Oracle Cloud button under "Magic Button" in the readme.

We provide many example Terraform configuration files that show you how to create specific OCI resources. These examples are intended to be as simple as possible. In most cases, they contain only the specific resource and any dependencies required for it to run.

Examples are grouped by service, including Compute, Database, Networking, Load Balancer, and several others.

These don't represent production configurations or real world scenarios, but they can serve as a starting point and be modified and combined as necessary.


Oracle also provides templates for Resource Manager. Resource Manager uses Terraform to automate deployment and operations for OCI resources.

Templates can help those new to infrastructure-as-code and those who are updating production configurations. Use templates to try out Resource Manager and inspect the underlying oracle-terraform-modules to familiarize yourself with Terraform configuration files.