This repo contains a Module for how to deploy a Consul cluster on OVH Public Cloud using Terraform. Consul is a distributed, highly-available tool that you can use for service discovery and key/value storage. A Consul cluster typically includes a small number of server nodes, which are responsible for being part of the consensus quorum, and a larger number of client nodes, which you typically run alongside your apps.
module "consul_servers" {
source = "ovh/publiccloud-consul/ovh"
count = 3
name = "example_consul_cluster"
cidr = "10.0.0.0/16"
region = "${var.region}"
datacenter = "${lower(var.region)}"
network_id = "XXX"
subnet_id = "YYY"
ssh_key_pair = "mykeypair"
image_id = "ZZZ"
cluster_tag_value = "myconsulcluster"
metadata = {
Terraform = "true"
Environment = "Consul"
}
}
This module has the following folder structure:
- root: This folder shows an example of Terraform code which deploys a Consul cluster in OVH Public Cloud.
- modules: This folder contains the reusable code for this Module, broken down into one or more modules.
- examples: This folder contains examples of how to use the modules.
To deploy Consul servers using this Module:
-
(Optional) Create a Consul Glance Image using a Packer template that references the install-consul module. Here is an example Packer template.
-
Deploy that Image using the Terraform consul-cluster example. If you prebuilt a consul glance image with packer, you can comment the post provisionning modules arguments.
Contributions are very welcome! Check out the Contribution Guidelines for instructions.
Module managed by Yann Degat.
This module was originally based on the terraform-aws-consul module by Gruntwork
The 3-Clause BSD License. See LICENSE for full details.