From 49eed52131d72567fba7d114b8fa62e8bf140fb5 Mon Sep 17 00:00:00 2001 From: GnomeZworc Date: Fri, 9 Dec 2022 16:36:25 +0100 Subject: [PATCH] issue-1: concatenate and remove default vars Signed-off-by: GnomeZworc --- passwd.auto.tfvars.example | 11 ++-- var.tf | 104 ++++++++++--------------------------- 2 files changed, 29 insertions(+), 86 deletions(-) diff --git a/passwd.auto.tfvars.example b/passwd.auto.tfvars.example index a7dc915..537b9db 100644 --- a/passwd.auto.tfvars.example +++ b/passwd.auto.tfvars.example @@ -1,13 +1,8 @@ #Netbox - - netbox_server_url = "https://netbox.exemple.net" netbox_api_token = "" -netbox_allow_insecure_https = false #XO - -xo_url = "ws://xo.example.net" -xo_username = "admin" -xo_password = "passwd" -xo_insecure = true +xo_url = "ws://xo.example.net" +xo_username = "admin" +xo_password = "passwd" \ No newline at end of file diff --git a/var.tf b/var.tf index 721275e..c58bf2e 100644 --- a/var.tf +++ b/var.tf @@ -1,101 +1,49 @@ -#Provider -variable "netbox_server_url" { - type = string -} +#Providers -variable "netbox_api_token" { - type = string -} +## Netbox +variable "netbox_server_url" { type = string } +variable "netbox_api_token" { type = string } variable "netbox_allow_insecure_https" { type = string + default = false } -variable "xo_url" { - type = string -} - -variable "xo_username" { - type = string -} - -variable "xo_password" { - type = string -} - +## Xen Orchestra +variable "xo_url" { type = string } +variable "xo_username" { type = string } +variable "xo_password" { type = string } variable "xo_insecure" { type = string + default = true } #Main -variable "netbox_prefix" { - type = string -} +variable "netbox_prefix" { type = string } +variable "netmask_netbox" { type = string } +variable "gateway" { type = string } +variable "netmask" { type = string } -variable "netmask_netbox" { - type = string -} - -variable "gateway" { - type = string -} - -variable "netmask" { - type = string -} - -variable "dns_name" { - type = string -} - -variable "storage" { - type = string -} - -variable "network" { - type = string -} - -variable "pool" { - type = string -} - -variable "template" { - type = string -} +variable "dns_name" { type = string } +variable "storage" { type = string } +variable "network" { type = string } +variable "pool" { type = string } +variable "template" { type = string } variable "playbook" { type = string default = "" } -variable "cpu" { - type = number -} - -variable "ram" { - type = number -} - -variable "name" { - type = string -} - -variable "desc" { - type = string -} - -variable "disk_size" { - type = number -} - -variable "ssh_keys" { - type = string -} - +variable "cpu" { type = number } +variable "ram" { type = number } +variable "name" { type = string } +variable "desc" { type = string } +variable "disk_size" { type = number } +variable "ssh_keys" { type = string } variable "vm_tags" { type = list default = [] -} +} \ No newline at end of file