A working esxi deployment for base ubuntu 14 node
This commit is contained in:
parent
56b6024010
commit
30944f7f82
49
ahoskingit/terraform/plex.tf
Normal file
49
ahoskingit/terraform/plex.tf
Normal file
@ -0,0 +1,49 @@
|
||||
# Everything required to build the Plex server workload goes here
|
||||
# ESXI is the intended provider
|
||||
provider "vsphere" {
|
||||
user = "${var.vsphere_user}"
|
||||
password = "${var.vsphere_password}"
|
||||
vsphere_server = "${var.vsphere_server}"
|
||||
#Because no signed cert
|
||||
allow_unverified_ssl = true
|
||||
}
|
||||
|
||||
# Create a folder for the vm
|
||||
#resource "vsphere_folder" "plex" {
|
||||
# path = "terraform/plex"
|
||||
# datacenter = "Datacenter"
|
||||
#}
|
||||
|
||||
# Create Disk File from Template
|
||||
#resource "vsphere_file" "ubuntu_disk" {
|
||||
# datastore = "datastore1 (1)"
|
||||
# datacenter = "Datacenter"
|
||||
# source_file = "[Nas] ubuntu_mini_template/ubuntu_mini_template.vmdk"
|
||||
# destination_file = "${vsphere_folder.plex.path}/plex.vmdk"
|
||||
#}
|
||||
|
||||
# Create the disk image file
|
||||
#resource "vsphere_virtual_disk" "plex_disk" {
|
||||
# size = 2
|
||||
# vmdk_path = "${vsphere_folder.plex.path}/plex.vmdk"
|
||||
# datacenter = "Datacenter"
|
||||
# datastore = "datastore1 (1)"
|
||||
# type = "thin"
|
||||
#}
|
||||
|
||||
# Create the VM
|
||||
resource "vsphere_virtual_machine" "plex" {
|
||||
name = "terraform_plex"
|
||||
vcpu = 1
|
||||
memory = 2048
|
||||
resource_pool = "192.168.1.31/"
|
||||
|
||||
network_interface {
|
||||
label = "VM Network"
|
||||
}
|
||||
|
||||
disk {
|
||||
datastore = "Nas"
|
||||
template = "ubuntu_14"
|
||||
}
|
||||
}
|
34
ahoskingit/terraform/terraform.tfstate
Normal file
34
ahoskingit/terraform/terraform.tfstate
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"version": 3,
|
||||
"terraform_version": "0.7.13",
|
||||
"serial": 4,
|
||||
"lineage": "55e8cea6-ab83-4a86-9270-0d029e8cac97",
|
||||
"modules": [
|
||||
{
|
||||
"path": [
|
||||
"root"
|
||||
],
|
||||
"outputs": {},
|
||||
"resources": {
|
||||
"vsphere_folder.plex": {
|
||||
"type": "vsphere_folder",
|
||||
"depends_on": [],
|
||||
"primary": {
|
||||
"id": "Datacenter/terraform/plex",
|
||||
"attributes": {
|
||||
"datacenter": "Datacenter",
|
||||
"existing_path": "",
|
||||
"id": "Datacenter/terraform/plex",
|
||||
"path": "terraform/plex"
|
||||
},
|
||||
"meta": {},
|
||||
"tainted": false
|
||||
},
|
||||
"deposed": [],
|
||||
"provider": ""
|
||||
}
|
||||
},
|
||||
"depends_on": []
|
||||
}
|
||||
]
|
||||
}
|
34
ahoskingit/terraform/terraform.tfstate.backup
Normal file
34
ahoskingit/terraform/terraform.tfstate.backup
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"version": 3,
|
||||
"terraform_version": "0.7.13",
|
||||
"serial": 4,
|
||||
"lineage": "55e8cea6-ab83-4a86-9270-0d029e8cac97",
|
||||
"modules": [
|
||||
{
|
||||
"path": [
|
||||
"root"
|
||||
],
|
||||
"outputs": {},
|
||||
"resources": {
|
||||
"vsphere_folder.plex": {
|
||||
"type": "vsphere_folder",
|
||||
"depends_on": [],
|
||||
"primary": {
|
||||
"id": "Datacenter/terraform/plex",
|
||||
"attributes": {
|
||||
"datacenter": "Datacenter",
|
||||
"existing_path": "",
|
||||
"id": "Datacenter/terraform/plex",
|
||||
"path": "terraform/plex"
|
||||
},
|
||||
"meta": {},
|
||||
"tainted": false
|
||||
},
|
||||
"deposed": [],
|
||||
"provider": ""
|
||||
}
|
||||
},
|
||||
"depends_on": []
|
||||
}
|
||||
]
|
||||
}
|
4
ahoskingit/terraform/variables.tf
Normal file
4
ahoskingit/terraform/variables.tf
Normal file
@ -0,0 +1,4 @@
|
||||
# set these puppies on the command line with -var "variable=val"
|
||||
variable "vsphere_user" {}
|
||||
variable "vsphere_password" {}
|
||||
variable "vsphere_server" {}
|
Loading…
Reference in New Issue
Block a user