Using Terraform to Build an etcd2 Cluster on OpenStack
In this post I’ll build on my earlier introduction to Terraform to show a practical example of using Terraform to build a CoreOS-based etcd2 cluster on OpenStack. This information is based upon a demo that I created for a session at the Austin OpenStack Summit in late April, so all the files I reference in this post are available in the GitHub repo for that session.
You may recall that Terraform is a platform-independent orchestration tool that allows you to create configurations (in either Terraform format or JSON format) specifying resources to be created/modified/deleted. This allows users to take an “infrastructure as code” approach where infrastructure configuration can be declaratively defined and managed via well-known version control mechanisms. In my previous post, I used JSON for the Terraform configurations; in this post, I’ll use the “standard” Terraform format.
As in the intro to Terraform post, I’ll use three different files:
- The
vars.tf
file, which contains variables we’ll reference later - The
main.tf
file, which has the actual resource definitions - The
output.tf
file, which will provide some feedback to the user on the resources being created by Terraform (in this case, IP addresses)
Note that there’s no Continue reading