Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

oracle/terraform-opc-compute-instance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

OCI Classic Compute Instance

This Terraform module creates a single Oracle Cloud Infrastructure Classic Compute (OPC) instance with a persistent block storage boot volume and a single network interface on either the Shared Network or an IP Network interface, with an optional Public IP address reservation.

Usage

Persistent instance on IP Network

If an IP Network is provided the instance is created with interface on the ip network. Note that the Public IP Address reservation, if provided, must be an opc_compute_ip_address_reservation

module "opc_instance_on_ip_network" {
  source           = "oracle/compute-instance/opc"
  instance_name    = "instance-on-ip-network"
  instance_shape   = "oc3"
  ip_network       = "${opc_compute_ip_network.ip-network.name}"
  ip_reservation   = "${opc_compute_ip_address_reservation.ip-reservation.name}"
  search_domains   = ["cloud.oracle.com", "oraclecloud.com"]
}

resource "opc_compute_ip_network" "ip-network" {
  name              = "test-ip-network"
  ip_address_prefix = "192.168.1.0/24"
}

resource "opc_compute_ip_address_reservation" "ip-reservation" {
  name            = "test-ip-reservertion"
  ip_address_pool = "public-ippool"
}

Persistent instance on Shared Network

If no IP Network is provided the instance is created with the interface on the Shared Network. Note that the Public IP Address reservation, if provided, must be an opc_compute_ip_reservation

module "opc_instance_on_shared_network" {
  source         = "oracle/compute-instance/opc"
  instance_name  = "instance-on-shared-network"
  instance_shape = "oc3"
  ip_reservation = "${opc_compute_ip_reservation.ip-reservation.name}"
  search_domains = ["cloud.oracle.com", "oraclecloud.com"]
}

resource "opc_compute_ip_reservation" "ip-reservation" {
  parent_pool = "/oracle/public/ippool"
  permanent   = true
}

License

Licensed under the Universal Permissive License v 1.0

Copyright © 2017, 2021 Oracle and/or its affiliates. All rights reserved.

About

Terraform Module for creating Oracle Cloud Infrastructure OPC Compute instances

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages