Skip to content

Commit 76c14e9

Browse files
committed
Additions to documentation
1 parent 1a9e860 commit 76c14e9

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

modules/base_node/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@ data "template_file" "node_name" {
2626
template = var.name_template
2727

2828
vars = merge(var.extra_template_vars, {
29+
"node_count" = "${count.index+1}"
2930
"itemcount" = "${count.index+1}"
3031
})
3132
}
3233
data "template_file" "node_dns" {
3334
count = var.servers
3435
template = var.dns_template
3536
vars = merge(var.extra_template_vars, {
37+
"node_count" = "${count.index+1}"
38+
"node_name" = data.template_file.node_name[count.index].rendered
3639
"itemcount" = "${count.index+1}"
3740
"name" = data.template_file.node_name[count.index].rendered
3841
})

variables.tf

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
variable "extra_template_vars" {
22
type = map
33
default = {}
4+
description = "A collection of variables to use in all template rendering."
45
}
56
variable "vpc_id" {
67
type = string
@@ -64,7 +65,7 @@ variable "jolokia_enabled" {
6465
variable "user_data_template_vars" {
6566
type = map
6667
default = {}
67-
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the extra_template_vars param."
68+
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the extra_template_vars param as well as node_count, node_name, node_dns, node_devices."
6869
}
6970

7071

@@ -228,7 +229,7 @@ variable "zookeeper_user_data_template" {
228229
variable "zookeeper_user_data_template_vars" {
229230
type = map
230231
default = {}
231-
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the zookeeper_extra_template_vars param."
232+
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the zookeeper_extra_template_vars param as well as node_count, node_name, node_dns, node_devices."
232233
}
233234

234235
###########################
@@ -383,7 +384,7 @@ variable "kafka_broker_user_data_template" {
383384
variable "kafka_broker_user_data_template_vars" {
384385
type = map
385386
default = {}
386-
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the kafka_broker_extra_template_vars param."
387+
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the kafka_broker_extra_template_vars param as well as node_count, node_name, node_dns, node_devices."
387388
}
388389

389390
###########################
@@ -524,7 +525,7 @@ variable "kafka_connect_user_data_template" {
524525
variable "kafka_connect_user_data_template_vars" {
525526
type = map
526527
default = {}
527-
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the kafka_connect_extra_template_vars param."
528+
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the kafka_connect_extra_template_vars param as well as node_count, node_name, node_dns, node_devices."
528529
}
529530

530531
###########################
@@ -663,7 +664,7 @@ variable "control_center_user_data_template" {
663664
variable "control_center_user_data_template_vars" {
664665
type = map
665666
default = {}
666-
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the control_center_extra_template_vars param."
667+
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the control_center_extra_template_vars param as well as node_count, node_name, node_dns, node_devices."
667668
}
668669

669670
###########################
@@ -814,7 +815,7 @@ variable "ksql_user_data_template" {
814815
variable "ksql_user_data_template_vars" {
815816
type = map
816817
default = {}
817-
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the ksql_extra_template_vars param."
818+
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the ksql_extra_template_vars param as well as node_count, node_name, node_dns, node_devices."
818819
}
819820

820821
###########################
@@ -941,7 +942,7 @@ variable "rest_proxy_user_data_template" {
941942
variable "rest_proxy_user_data_template_vars" {
942943
type = map
943944
default = {}
944-
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the rest_proxy_extra_template_vars param."
945+
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the rest_proxy_extra_template_vars param as well as node_count, node_name, node_dns, node_devices."
945946
}
946947

947948
###########################
@@ -1068,5 +1069,5 @@ variable "schema_registry_user_data_template" {
10681069
variable "schema_registry_user_data_template_vars" {
10691070
type = map
10701071
default = {}
1071-
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the schema_registry_extra_template_vars param."
1072+
description = "A collection of variables to give to the user data template during render. These will be in addition to the vars already passed in the schema_registry_extra_template_vars param as well as node_count, node_name, node_dns, node_devices."
10721073
}

0 commit comments

Comments
 (0)