Skip to content

Instantly share code, notes, and snippets.

@weargoggles
Created November 18, 2017 16:02
Show Gist options
  • Save weargoggles/c1c06f99c4a49ebbefaf71da42eac5bb to your computer and use it in GitHub Desktop.
Save weargoggles/c1c06f99c4a49ebbefaf71da42eac5bb to your computer and use it in GitHub Desktop.
data "consul_catalog_service" "consul" {
name = "consul"
}
data "template_file" "consul_join_configuration" {
template = "${file("${path.module}/templates/consul_join.json")}"
vars {
service = "${jsonencode(data.consul_catalog_service.consul.service.*.address)}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment