Compare commits
6 Commits
v0.0.4
...
6a9181d1b4
Author | SHA1 | Date | |
---|---|---|---|
6a9181d1b4 | |||
e07fd1c49d | |||
f2864ecc84 | |||
55a9334df3 | |||
97624cb42d | |||
e8140d8b3f |
6
modules/virtualMachine/locals.tf
Normal file
6
modules/virtualMachine/locals.tf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
locals {
|
||||||
|
fqdn = "${var.vm_shortname}.${var.vm_domain}"
|
||||||
|
system_image_name = "system.${local.fqdn}"
|
||||||
|
system_image_source = var.system_image_source
|
||||||
|
data_image_name = "data.${local.fqdn}"
|
||||||
|
}
|
@ -3,7 +3,7 @@ output "shortname" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
output "fqdn" {
|
output "fqdn" {
|
||||||
value = var.vm_fqdn
|
value = local.fqdn
|
||||||
}
|
}
|
||||||
|
|
||||||
output "first_nic_mac" {
|
output "first_nic_mac" {
|
||||||
|
@ -8,11 +8,6 @@ variable "one_prod_ds" {
|
|||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "vm_fqdn" {
|
|
||||||
description = "Virtual Machine FQDN Name"
|
|
||||||
type = string
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "vm_shortname" {
|
variable "vm_shortname" {
|
||||||
description = "Virtual machine short name"
|
description = "Virtual machine short name"
|
||||||
type = string
|
type = string
|
||||||
@ -23,24 +18,12 @@ variable "vm_domain" {
|
|||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "system_image_name" {
|
|
||||||
description = "System image disk name"
|
|
||||||
type = string
|
|
||||||
default = "${var.vm_shortname}.system"
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "system_image_source" {
|
variable "system_image_source" {
|
||||||
description = "Virtual Machine system image source"
|
description = "Virtual Machine system image source"
|
||||||
type = string
|
type = string
|
||||||
default = "https://marketplace.opennebula.io//appliance/251b0578-6c47-4ba4-b184-dc6e873201a2/download/0"
|
default = "https://marketplace.opennebula.io//appliance/251b0578-6c47-4ba4-b184-dc6e873201a2/download/0"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "data_image_name" {
|
|
||||||
description = "Data image disk name"
|
|
||||||
type = string
|
|
||||||
default = "${var.vm_shortname}.data"
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "data_image_source" {
|
variable "data_image_source" {
|
||||||
description = "Virtual Machine data disk image source"
|
description = "Virtual Machine data disk image source"
|
||||||
type = string
|
type = string
|
||||||
@ -109,5 +92,5 @@ variable "graphics" {
|
|||||||
variable "imagemode" {
|
variable "imagemode" {
|
||||||
description = "Disk image mode"
|
description = "Disk image mode"
|
||||||
type = string
|
type = string
|
||||||
default = "0600"
|
default = "600"
|
||||||
}
|
}
|
Reference in New Issue
Block a user