Skip to content

Commit 1d75be4

Browse files
committed
CI: Add tags to aio VMs
This will make it easier to identify them.
1 parent 4837c8d commit 1d75be4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.github/workflows/stackhpc-all-in-one.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ jobs:
134134
aio_vm_flavor = "${{ env.VM_FLAVOR }}"
135135
aio_vm_network = "${{ env.VM_NETWORK }}"
136136
aio_vm_subnet = "${{ env.VM_SUBNET }}"
137+
aio_vm_tags = ${{ env.VM_TAGS }}
137138
EOF
138139
working-directory: ${{ github.workspace }}/terraform/aio
139140
env:
@@ -144,6 +145,7 @@ jobs:
144145
VM_NETWORK: ${{ inputs.vm_network }}
145146
VM_SUBNET: ${{ inputs.vm_subnet }}
146147
VM_INTERFACE: ${{ inputs.vm_interface }}
148+
VM_TAGS: '["skc-ci-aio", "PR=${{ github.event.number }}"]'
147149

148150
- name: Terraform Plan
149151
run: terraform plan

terraform/aio/vm.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ variable "aio_vm_volume_size" {
3838
default = 35
3939
}
4040

41+
variable "aio_vm_tags" {
42+
type = list(string)
43+
default = []
44+
}
45+
4146
locals {
4247
image_is_uuid = length(regexall("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", var.aio_vm_image)) > 0
4348
}
@@ -69,6 +74,8 @@ resource "openstack_compute_instance_v2" "kayobe-aio" {
6974
destination_type = "volume"
7075
delete_on_termination = true
7176
}
77+
78+
tags = var.aio_vm_tags
7279
}
7380

7481
# Wait for the instance to be accessible via SSH before progressing.

0 commit comments

Comments
 (0)