• HashiCorp Developer

  • HashiCorp Cloud Platform
  • Terraform
  • Packer
  • Consul
  • Vault
  • Boundary
  • Nomad
  • Waypoint
  • Vagrant
Terraform
  • Install
  • Tutorials
    • About the Docs
    • Configuration Language
    • Terraform CLI
    • Terraform Cloud
    • Terraform Enterprise
    • CDK for Terraform
    • Provider Use
    • Plugin Development
    • Registry Publishing
    • Integration Program
  • Registry(opens in new tab)
  • Try Cloud(opens in new tab)
  • Sign up
Terraform Home

Tutorials

Skip to main contentOverview

Get Started

  • AWS
  • Azure
  • Docker
  • GCP
  • OCI
  • Terraform Cloud

Fundamentals

  • CLI
  • Configuration Language
  • Modules
  • Provision
  • State
  • Terraform Cloud

Use Cases

  • Applications
  • AWS Services
  • Azure Services
  • HashiCorp Products
  • IT/SaaS Providers
  • Kubernetes
  • Machine Images
  • Networking
  • Policy
  • Security

Certification Prep

  • Associate Prep (002)
  • Associate Prep (003)
  • Associate Tutorials (002)
  • Associate Tutorials (003)

Production

  • Automate Terraform
  • Enterprise Patterns
  • Terraform Enterprise

Integrations

  • CDK for Terraform
  • Community Providers
  • Custom Framework Providers
  • Custom SDK Providers
  • Secrets

  • Resources

  • Tutorial Library
  • Certifications
  • Community Forum
    (opens in new tab)
  • Support
    (opens in new tab)
  • GitHub
    (opens in new tab)
  • Terraform Registry
    (opens in new tab)
  1. Developer
  2. Terraform
  3. Tutorials
  4. OCI

Get Started - OCI

Build, change, and destroy a virtual cloud network and subnet on Oracle Cloud Infrastructure (OCI) using Terraform. Step-by-step, command-line tutorials will walk you through the Terraform basics for the first time.

Start
7 tutorials
  1.  
    3min
    What is Infrastructure as Code with Terraform?
    Learn how infrastructure as code lets you safely build, change, and manage infrastructure. Try Terraform.
    • Terraform
    • Interactive
    • Video
  2.  
    9min
    Install Terraform
    Install Terraform on Mac, Linux, or Windows by downloading the binary or using a package manager (Homebrew or Chocolatey). Then create a Docker container locally by following a quick-start tutorial to check that Terraform installed correctly.
    • Terraform
    • Interactive
    • Video
  3.  
    12min
    Build Infrastructure - Terraform OCI Example
    Authenticate to Oracle Cloud Infrastructure, and create a Virtual Cloud Network. Write, format and validate a Terraform configuration. Plan and apply the configuration to create an VCN OCI resource.
    • Terraform
  4.  
    6min
    Change Infrastructure
    Add a subnet to your Oracle Cloud Infrastructure (OCI) VCN. Modify the subnet display name and plan changes to update the resource in place. Learn how Terraform handles infrastructure change management.
    • Terraform
  5.  
    5min
    Destroy Infrastructure
    Destroy the Oracle Cloud Infrastructure (OCI) Virtual Cloud Network (VCN) and subnet you created in the previous tutorials. Evaluate the plan and confirm the destruction.
    • Terraform
  6.  
    6min
    Define Input Variables
    Declare your OCI region and compartment ID as variables. Reference the variable in Terraform configuration. Define variables using .tfvars files or default values.
    • Terraform
  7.  
    6min
    Query Data with Outputs
    Declare output values to display the status and CIDR block of your OCI VCN. Display all outputs and query specific outputs. Define what data stored in Terraform state is relevant to the operator or end user.
    • Terraform
Give Feedback(opens in new tab)
  • Certifications
  • System Status
  • Terms of Use
  • Security
  • Privacy
  • Trademark Policy
  • Trade Controls
  • Give Feedback(opens in new tab)