Compare commits
3 Commits
6a9181d1b4
...
v0.0.6
Author | SHA1 | Date | |
---|---|---|---|
b209942b3d | |||
f821f97b9e | |||
e42ce275c1 |
@ -1,3 +1,8 @@
|
|||||||
|
|
||||||
|
resource "opennebula_group" "main" {
|
||||||
|
name = var.group
|
||||||
|
}
|
||||||
|
|
||||||
// OpenNebula disk image !
|
// OpenNebula disk image !
|
||||||
resource "opennebula_image" "system" {
|
resource "opennebula_image" "system" {
|
||||||
name = local.system_image_name
|
name = local.system_image_name
|
||||||
@ -24,7 +29,7 @@ resource "opennebula_image" "data" {
|
|||||||
driver = "qcow2"
|
driver = "qcow2"
|
||||||
format = "qcow2"
|
format = "qcow2"
|
||||||
permissions = "660"
|
permissions = "660"
|
||||||
group = "production"
|
group = var.group
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenNebula (VM) Template definition
|
// OpenNebula (VM) Template definition
|
||||||
@ -52,6 +57,10 @@ resource "opennebula_template" "vm_template" {
|
|||||||
image_id = opennebula_image.data.id
|
image_id = opennebula_image.data.id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
os {
|
||||||
|
arch = "x86_64"
|
||||||
|
boot = "disk0,nic0"
|
||||||
|
}
|
||||||
//labels = var.tag_labels
|
//labels = var.tag_labels
|
||||||
|
|
||||||
dynamic "nic" {
|
dynamic "nic" {
|
||||||
|
@ -43,16 +43,19 @@ variable "network_interfaces" {
|
|||||||
variable "cpu" {
|
variable "cpu" {
|
||||||
description = "VM CPU"
|
description = "VM CPU"
|
||||||
type = string
|
type = string
|
||||||
|
default = "0.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "vcpu" {
|
variable "vcpu" {
|
||||||
description = "VM vCPU"
|
description = "VM vCPU"
|
||||||
type = string
|
type = string
|
||||||
|
default = "2"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "ram" {
|
variable "ram" {
|
||||||
description = "VM RAM"
|
description = "VM RAM"
|
||||||
type = string
|
type = string
|
||||||
|
default = "512"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "depends" {
|
variable "depends" {
|
||||||
|
Reference in New Issue
Block a user