Skip to content

Commit 3a024a0

Browse files
authored
Merge pull request #84 from stackhpc/ci-tags
Added configurable tags global to compute instances
2 parents 4288de1 + 95caf17 commit 3a024a0

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

compute_instances.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ resource "openstack_compute_instance_v2" "ansible_control" {
4747
user_data
4848
]
4949
}
50+
tags = var.instance_tags
5051
}
5152

5253
resource "openstack_compute_instance_v2" "seed" {
@@ -74,6 +75,7 @@ resource "openstack_compute_instance_v2" "seed" {
7475
timeouts {
7576
create = "90m"
7677
}
78+
tags = var.instance_tags
7779
}
7880

7981
resource "openstack_compute_instance_v2" "compute" {
@@ -102,6 +104,7 @@ resource "openstack_compute_instance_v2" "compute" {
102104
timeouts {
103105
create = "90m"
104106
}
107+
tags = var.instance_tags
105108
}
106109
resource "openstack_compute_instance_v2" "controller" {
107110
name = format("%s-controller-%02d", var.prefix, count.index + 1)
@@ -129,6 +132,8 @@ resource "openstack_compute_instance_v2" "controller" {
129132
timeouts {
130133
create = "90m"
131134
}
135+
136+
tags = var.instance_tags
132137
}
133138

134139
resource "openstack_compute_instance_v2" "storage" {
@@ -157,6 +162,7 @@ resource "openstack_compute_instance_v2" "storage" {
157162
timeouts {
158163
create = "90m"
159164
}
165+
tags = var.instance_tags
160166
}
161167

162168
resource "openstack_compute_instance_v2" "wazuh_manager" {
@@ -182,4 +188,5 @@ resource "openstack_compute_instance_v2" "wazuh_manager" {
182188
timeouts {
183189
create = "90m"
184190
}
191+
tags = var.instance_tags
185192
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,9 @@ variable "volume_type" {
135135
type = string
136136
default = ""
137137
}
138+
139+
variable "instance_tags" {
140+
description = "Set of tags to be applied to all instances"
141+
type = list(string)
142+
default = []
143+
}

0 commit comments

Comments
 (0)