fix(nebula): improve resource templates
This commit is contained in:
parent
5059720757
commit
f5412c3138
|
@ -12,7 +12,7 @@ variable "image_format" {
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "dev_prefix" {
|
variable "dev_prefix" {
|
||||||
default = "vd"
|
default = "sd"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "permissions" {
|
variable "permissions" {
|
||||||
|
@ -47,7 +47,7 @@ resource "opennebula_image" "system" {
|
||||||
permissions = var.permissions
|
permissions = var.permissions
|
||||||
}
|
}
|
||||||
|
|
||||||
// data image
|
/* data image not needed now
|
||||||
resource "opennebula_image" "data" {
|
resource "opennebula_image" "data" {
|
||||||
for_each = var.vms
|
for_each = var.vms
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ resource "opennebula_image" "data" {
|
||||||
format = var.image_format
|
format = var.image_format
|
||||||
dev_prefix = var.dev_prefix
|
dev_prefix = var.dev_prefix
|
||||||
permissions = var.permissions
|
permissions = var.permissions
|
||||||
}
|
}*/
|
||||||
|
|
||||||
resource "opennebula_template" "vm_template" {
|
resource "opennebula_template" "vm_template" {
|
||||||
for_each = var.vms
|
for_each = var.vms
|
||||||
|
@ -84,9 +84,12 @@ resource "opennebula_template" "vm_template" {
|
||||||
disk {
|
disk {
|
||||||
image_id = opennebula_image.system[each.key].id
|
image_id = opennebula_image.system[each.key].id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Not needed now
|
||||||
disk {
|
disk {
|
||||||
image_id = opennebula_image.data[each.key].id
|
image_id = opennebula_image.data[each.key].id
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
os {
|
os {
|
||||||
arch = "x86_64"
|
arch = "x86_64"
|
||||||
|
|
|
@ -3,4 +3,5 @@ locals {
|
||||||
system_image_name = "system.${local.fqdn}"
|
system_image_name = "system.${local.fqdn}"
|
||||||
system_image_source = var.system_image_source
|
system_image_source = var.system_image_source
|
||||||
data_image_name = "data.${local.fqdn}"
|
data_image_name = "data.${local.fqdn}"
|
||||||
|
group = "${var.group}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
resource "opennebula_group" "main" {
|
resource "opennebula_group" "main" {
|
||||||
name = var.group
|
name = var.group
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue