Skip to content

Instantly share code, notes, and snippets.

@scross01
Last active January 5, 2018 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scross01/4ff94777ae25fa5b508c69f8e82af13f to your computer and use it in GitHub Desktop.
Save scross01/4ff94777ae25fa5b508c69f8e82af13f to your computer and use it in GitHub Desktop.
resource "opc_compute_ip_network" "ipnet1" {
name = "ipnet1"
ip_address_prefix = "192.168.4.0/24"
}
resource "opc_compute_storage_volume" "boot" {
size = "12"
name = "boot"
bootable = true
image_list = "/oracle/public/OL_7.2_UEKR4_x86_64"
image_list_entry = 1
}
resource "opc_compute_acl" "acl1" {
name = "acl1"
}
resource "opc_compute_vnic_set" "vnicset1" {
name = "vnicset1"
applied_acls = ["${opc_compute_acl.acl1.name}"]
}
resource "opc_compute_ssh_key" "key1" {
name = "key1"
key = "${file("~/.ssh/id_rsa.pub")}"
}
resource "opc_compute_orchestrated_instance" "MyInstance" {
name = "example-instance-orchestraion"
description = "Example Instance Orchesrtation"
desired_state = "active"
instance {
persistent = true
name = "vm-1"
hostname = "vm-1"
shape = "oc3"
ssh_keys = ["${opc_compute_ssh_key.key1.name}"]
networking_info {
index = 1
ip_network = "${opc_compute_ip_network.ipnet1.name}"
vnic_sets = ["${opc_compute_vnic_set.vnicset1.name}]"
}
storage {
index = 1
volume = "${opc_compute_storage_volume.boot.name}"
}
boot_order = [1]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment