Skip to content
This repository has been archived by the owner on Jan 11, 2018. It is now read-only.

makethunder/terraform-provider-etcdiscovery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-provider-etcdiscovery

Terraform provider for generating etcd discovery tokens

Circle CI

Installation

  1. Install Terraform.
  2. go get github.com/paperg/terraform-provider-etcdiscovery

Usage

resource "etcdiscovery_token" "foo" { }
resource "etcdiscovery_token" "bar" {
    size = 5
}

output "foo" {
    value = "${etcdiscovery_token.foo.id}"
}

output "bar" {
    value = "${etcdiscovery_token.bar.id}"
}

Interpolate the id attribute into the cloud-init data for your CoreOS instances for the win.

There isn't much else to it. Destroying the token doesn't really do anything other that remove it from Terraform's state so that a new one will be generated on the next run. This means you can terraform apply to create a CoreOS cluster, then terraform destroy to kill it all, then terraform apply to make a new one again and the new cluster will get a new discovery token, which is probably what you wanted.

If you are running your own discovery service then you can configure an alternate URL like this:

provider "etcdiscovery" {
    url = "http://example.com/new"
}

About

Terraform provider for generating etcd discovery tokens

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages