GithubHelp home page GithubHelp logo

isabella232 / terraform-opc-compute-instance Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oracle/terraform-opc-compute-instance

0.0 0.0 0.0 8 KB

Terraform Module for creating Oracle Cloud Infrastructure OPC Compute instances

HCL 100.00%

terraform-opc-compute-instance's Introduction

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.

terraform-opc-compute-instance's People

Contributors

scross01 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.