Skip to content

Commit

Permalink
Merge pull request #84 from stackhpc/ci-tags
Browse files Browse the repository at this point in the history
Added configurable tags global to compute instances
  • Loading branch information
Alex-Welsh authored Jan 13, 2025
2 parents 4288de1 + 95caf17 commit 3a024a0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions compute_instances.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ resource "openstack_compute_instance_v2" "ansible_control" {
user_data
]
}
tags = var.instance_tags
}

resource "openstack_compute_instance_v2" "seed" {
Expand Down Expand Up @@ -74,6 +75,7 @@ resource "openstack_compute_instance_v2" "seed" {
timeouts {
create = "90m"
}
tags = var.instance_tags
}

resource "openstack_compute_instance_v2" "compute" {
Expand Down Expand Up @@ -102,6 +104,7 @@ resource "openstack_compute_instance_v2" "compute" {
timeouts {
create = "90m"
}
tags = var.instance_tags
}
resource "openstack_compute_instance_v2" "controller" {
name = format("%s-controller-%02d", var.prefix, count.index + 1)
Expand Down Expand Up @@ -129,6 +132,8 @@ resource "openstack_compute_instance_v2" "controller" {
timeouts {
create = "90m"
}

tags = var.instance_tags
}

resource "openstack_compute_instance_v2" "storage" {
Expand Down Expand Up @@ -157,6 +162,7 @@ resource "openstack_compute_instance_v2" "storage" {
timeouts {
create = "90m"
}
tags = var.instance_tags
}

resource "openstack_compute_instance_v2" "wazuh_manager" {
Expand All @@ -182,4 +188,5 @@ resource "openstack_compute_instance_v2" "wazuh_manager" {
timeouts {
create = "90m"
}
tags = var.instance_tags
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,9 @@ variable "volume_type" {
type = string
default = ""
}

variable "instance_tags" {
description = "Set of tags to be applied to all instances"
type = list(string)
default = []
}

0 comments on commit 3a024a0

Please sign in to comment.