This repo is a demonstration of creating self-discovering Etcd clusters with Terraform.
Google is the cloud provider used here, but any other cloud provider supported by both CoreOS and Terraform would work just as well (e.g. AWS).
For more background information, see here.
- Terraform
- A Google Cloud account
- Clone this repo
- Log in to your Google Cloud account
- Create a new project, e.g. "etcd-terraform"
- Enable the Google Compute API for the project
- Create a New Client ID (service account)
The last step will provide you with the credentials you will need to authenticate with Google Cloud via Terraform. Put them somewhere safe.
In your local clone of this repo, you will need to update terraform.tfvars.json
with your Google Project ID and the path to your credentials.
To boot the cluster, simply run the following inside your local clone of this repo.
$ terraform apply
The etcd_discovery_url.txt
is purposefully empty. Terraform complains if you try
to read with ${file(...)}
from a non-existent file.