turnbullpress / tf_consul

A Consul module for Terraform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS Consul service module for Terraform

A lightweight Consul service module for The Terraform Book.

Usage

variable "token" {}

variable "encryption_key" {}

module "consul" {
  source            = "github.com/turnbullpublishing/tf_consul"
  environment       = "${var.environment}"
  token             = "${var.token}"
  encryption_key    = "${var.encryption_key}"
  vpc_id            = "${module.vpc.vpc_id}"
  public_subnet_id  = "${var.public_subnet_id}"
  region            = "${var.region}"
  key_name          = "${var.key_name}"
}

output "consul_server_address" {
  value = ["${module.consul.dns_address}"]
}

output "consul_host_addresses" {
  value = ["${module.consul.host_addresses}"]
}

Assumes you're building your Consul service inside a VPC created from this module.

See interface.tf for additional configurable variables.

License

MIT

About

A Consul module for Terraform

License:MIT License


Languages

Language:HCL 64.8%Language:Shell 30.3%Language:Smarty 4.9%