Skip to content

bakins/terraform-provider-etcd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

etcd provider for Terraform

Terraform provider for etcd.

Status

Unmaintained. This is no longer under active development.

TODO

Install

This project used gb, so you must have it installed.

$ git clone https://github.com/bakins/terraform-provider-etcd
$ cd terraform-provider-etcd
$ make
$ sudo make install

will install to /usr/local/bin/terraform-provider-etcd. Set PREFIX to change this:

$sudo make install PREFIX=/usr

Note: You may need to add something like the following to ~/.terraformrc if you get an error about missing the etcd provider when running terraform:

providers {
  etcd = "/usr/local/bin/terraform-provider-etcd"
}

Usage

Discovery

Simple usage:

resource "etcd_discovery" "test" {
   size = 1
}

output "etcd" {
    value = "${etcd_discovery.test.url}"
}

The resource etcd_discovery has the following optional fields:

The resulting URL is availible in the url output of the resource -- etcd_discovery.test.url in this example.

Keys

etcd_keys operates similar to consul_keys

provider "etcd" {
    endpoint = "http://oneof.my.etcd.servers.or.proxies:port"
}

resource "etcd_keys" "ami" {
    # Read the launch AMI from etcd
    key {
        name = "ami"
        path = "service/app/launch_ami"
        default = "ami-1234"
    }

    # Set the CNAME of our load balancer as a key
    key {
        name = "elb_cname"
        path = "service/app/elb_address"
        value = "${aws_elb.app.dns_name}"
    }

# Start our instance with the dynamic ami value
resource "aws_instance" "app" {
    ami = "${etcd_keys.app.var.ami}"
    ...
}

About

etcd provider for Terraform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published