File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
environments/skeleton/{{cookiecutter.environment}}/tofu Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,10 @@ locals {
3
3
nodename = templatestring (
4
4
var. cluster_nodename_template ,
5
5
{
6
- node= " control" ,
7
- cluster_name= var.cluster_name,
8
- cluster_domain_suffix= var.cluster_domain_suffix
6
+ node = " control" ,
7
+ cluster_name = var.cluster_name,
8
+ cluster_domain_suffix = var.cluster_domain_suffix,
9
+ environment_name = basename (var. environment_root )
9
10
}
10
11
)
11
12
}
Original file line number Diff line number Diff line change @@ -18,9 +18,10 @@ locals {
18
18
for n in var . nodes : n => templatestring (
19
19
var.nodename_template,
20
20
{
21
- node= n,
22
- cluster_name= var.cluster_name,
23
- cluster_domain_suffix= var.cluster_domain_suffix
21
+ node = n,
22
+ cluster_name = var.cluster_name,
23
+ cluster_domain_suffix = var.cluster_domain_suffix,
24
+ environment_name = basename (var. environment_root )
24
25
}
25
26
)
26
27
}
Original file line number Diff line number Diff line change @@ -190,7 +190,8 @@ variable "cluster_nodename_template" {
190
190
$${cluster_domain_suffix}: From var.cluster_domain_suffix
191
191
$${node}: The current entry in the "nodes" parameter for nodes
192
192
defined by var.compute and var.login, or "control" for the control
193
- node.
193
+ node
194
+ $${environment_name}: The last element of the current environment's path
194
195
EOT
195
196
type = string
196
197
default = " $${cluster_name}-$${node}.$${cluster_name}.$${cluster_domain_suffix}"
You can’t perform that action at this time.
0 commit comments