Open dgrstl opened 7 years ago
Sure, consistency seems like a good idea. Should be an easy PR fix if anyone has the time :)
After investigating into the issue I would rather consider changing this line:
key = "${var.cluster_tag_key}"
( nomad-cluster/main.tf#L31 )
to
key = "Name"
to be consistent with consul-cluster/main.tf#L32.
The value ${var.cluster_tag_key}
will be filled by default to "Name" (nomad-cluster/variables.tf#L74) and this module does not needs to make use of the functionality intended for cluster_tag_value.
Thinking about it some more, we may want to change how we do tags a little bit similar to how it's described here: https://github.com/hashicorp/terraform-aws-vault/pull/12#pullrequestreview-67844307. We set some default tags that should work reasonably, but also take in a map of tags that allows the user to add/override tags as they wish.
https://github.com/hashicorp/terraform-aws-nomad/blob/223be6dfee91b7d94464609c65ae5a43ae6a1adb/modules/nomad-cluster/main.tf#L32
${var.cluster_tag_value} makes more sense and would make it consistent with the Consul module (https://github.com/hashicorp/terraform-aws-consul/blob/master/modules/consul-cluster/main.tf#L39). In any case, feels like each module should work in roughly the same way.