Skip to content

Commit 85a09e0

Browse files
committed
add environment path to instance metadata
1 parent 0f6233c commit 85a09e0

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

environments/smslabs/terraform/nodes.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ resource "openstack_compute_instance_v2" "control" {
1313
access_network = true
1414
}
1515

16+
metadata = {
17+
environment_root = var.environment_root
18+
}
19+
1620
}
1721

1822
resource "openstack_compute_instance_v2" "login" {
@@ -31,6 +35,10 @@ resource "openstack_compute_instance_v2" "login" {
3135
access_network = true
3236
}
3337

38+
metadata = {
39+
environment_root = var.environment_root
40+
}
41+
3442
}
3543

3644
resource "openstack_compute_instance_v2" "compute" {
@@ -49,4 +57,8 @@ resource "openstack_compute_instance_v2" "compute" {
4957
access_network = true
5058
}
5159

60+
metadata = {
61+
environment_root = var.environment_root
62+
}
63+
5264
}

environments/smslabs/terraform/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,8 @@ variable "compute_images" {
6666
default = {}
6767
description = "Mapping to override compute images from compute_types: key ->(str) node name, value -> (str) image name"
6868
}
69+
70+
variable "environment_root" {
71+
type = string
72+
description = "Path to environment root, automatically set by activate script"
73+
}

0 commit comments

Comments
 (0)