Skip to content

Example of Terraform configuration for minimal compute resources on OCI's Free Tier

License

Notifications You must be signed in to change notification settings

RhubarbSin/terraform-oci-free-compute-minimal-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-oci-free-compute-minimal-example

What it is

A Terraform configuration for compute resources on the Free Tier of Oracle Cloud Infrastructure.

What it does

Deploys a minimal set of resources to run a compute instance on the OCI Free Tier.

How to use it

For simplicity—to avoid the need to install and configure Terraform and the OCI CLI—this configuration is designed for deployment as a stack in the OCI Resource Manager.

  1. Download the repository as a ZIP file: on the repository’s GitHub page, select Download ZIP from the Code menu on the upper right.
  2. Log into the Oracle Cloud Infrastructure Console.
  3. Go to the Resource Manager: from the hamburger menu on the upper left, find Developer ServicesResource Manager and select Stacks.
  4. Click on the Create Stack button, select .zip file under Stack Configuration and select the file via the Browse link.
  5. Click on the Next button and provide an SSH public key.
  6. Click Next again and then Create.
  7. Click on the Plan button and start the plan job by clicking Plan again.
  8. After the plan job completes, from the Resource Manager » Stacks » Stack Details » Job Details page go to Resource Manager » Stacks » Stack Details.
  9. Click on the Apply button and start the apply job by clicking Apply again.
  10. After the apply job completes, from the hamburger menu find ComputeCompute and select Instances. Select the root compartment from the Compartment menu.
  11. Information for connecting to the instance with SSH can be found by selecting the instance (named OCI Free Compute Minimal by default) and viewing the details under Instance access on the Instance information tab.
  12. To destroy the resources, navigate back to Resource Manager » Stacks » Stack Details and click on the Destroy button and click Destroy again.
  13. To delete the stack, after the destroy job completes, from the Resource Manager » Stacks » Stack Details » Job Details page go to Resource Manager » Stacks » Stack Details. From the More Actions menu choose Delete Stack and then Delete.

Details

The resources deployed include the following:

  • One (1) Virtual Cloud Network
  • One (1) Internet Gateway
  • One (1) Subnet
  • One (1) AMD Micro instance running the latest Oracle Linux distribution with the following specifications:
    • 1 OCPU
    • 1 GiB of memory
    • 47 GiB of storage
    • 1 public IP address