Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Latest commit

 

History

History
57 lines (38 loc) · 2.87 KB

File metadata and controls

57 lines (38 loc) · 2.87 KB

Consul OVH Public Cloud Module

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.

Usage

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"
  }
}

Examples

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:

  1. (Optional) Create a Consul Glance Image using a Packer template that references the install-consul module. Here is an example Packer template.

  2. 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.

How do I contribute to this Module?

Contributions are very welcome! Check out the Contribution Guidelines for instructions.

Authors

Module managed by Yann Degat.

This module was originally based on the terraform-aws-consul module by Gruntwork

License

The 3-Clause BSD License. See LICENSE for full details.