Skip to content

Commit 0f29e75

Browse files
committed
fix #3 by adding var.tags and removing dummy tags
1 parent 6225263 commit 0f29e75

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,4 +215,10 @@ network:
215215
subnets:
216216
- type: dhcp
217217
EOF
218+
}
219+
220+
variable "tags" {
221+
description = "A list of key+value pairs to apply to the deployment"
222+
type = list(string)
223+
default = []
218224
}

xen_master.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ resource "xenorchestra_vm" "master" {
163163
wait_for_ip = true
164164
start_delay = var.start_delay
165165

166-
tags = concat(var.master_tags, ["inputobject2.github.io/cloud-os:ubuntu-20-04-focal", "kubernetes.io/role:primary", "inputobject2.github.io/deployment:${var.cluster_name}"])
166+
tags = concat(var.tags, var.master_tags, ["kubernetes.io/role:primary", "xcp-ng.org/deployment:${var.cluster_name}"])
167167

168168
lifecycle {
169169
ignore_changes = [ disk, affinity_host, template ]

xen_nodes.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ resource "xenorchestra_vm" "node" {
101101
wait_for_ip = true
102102
start_delay = var.start_delay
103103

104-
tags = concat(var.node_tags, ["inputobject2.github.io/cloud-os:ubuntu-20-04-focal", "inputobject2.github.io/deployment:${var.cluster_name}"])
104+
tags = concat(var.tags, var.node_tags, ["kubernetes.io/role:worker", "xcp-ng.org/deployment:${var.cluster_name}"])
105105

106106
lifecycle {
107107
ignore_changes = [ disk, affinity_host, template ]

xen_secondaries.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ resource "xenorchestra_vm" "secondary" {
104104
wait_for_ip = true
105105
start_delay = var.start_delay
106106

107-
tags = concat(var.master_tags, ["inputobject2.github.io/cloud-os:ubuntu-20-04-focal", "kubernetes.io/role:secondary", "inputobject2.github.io/deployment:${var.cluster_name}"])
107+
tags = concat(var.tags, var.master_tags, ["kubernetes.io/role:secondary", "xcp-ng.org/deployment:${var.cluster_name}"])
108108

109109
lifecycle {
110110
ignore_changes = [ disk, affinity_host, template ]

0 commit comments

Comments
 (0)