open-consul/terraform/digitalocean
2016-09-05 18:22:56 -05:00
..
consul.tf Add Terraform config for Digital Ocean 2016-09-05 18:22:56 -05:00
outputs.tf Add Terraform config for Digital Ocean 2016-09-05 18:22:56 -05:00
README.md Add Terraform config for Digital Ocean 2016-09-05 18:22:56 -05:00
terraform.tfvars.example Add Terraform config for Digital Ocean 2016-09-05 18:22:56 -05:00
variables.tf Add Terraform config for Digital Ocean 2016-09-05 18:22:56 -05:00

Requirements

Terraform installed
Digital Ocean account with API key
SSH key uploaded to Digital Ocean

Variables

Populate terraform.tfvars as follows (or execute with arguments as shown in Usage)

key_path = "~/.ssh/id_rsa"
do_token = "ASDFQWERTYDERP"
num_instances = "3"
ssh_key_ID = "my_ssh_keyID_in_digital_ocean"

Usage

terraform plan                      \
  -var 'key_path=~/.ssh/id_rsa'     \
  -var 'do_token=ASDFQWERTYDERP'    \
  -var 'num_instances=3'            \
  - var 'ssh_key_ID=86:75:30:99:88:88:AA:FF:DD'

terraform apply                     \
  -var 'key_path=~/.ssh/id_rsa'     \
  -var 'do_token=ASDFQWERTYDERP'    \
  -var 'num_instances=3'            \
  - var 'ssh_key_ID=86:75:30:99:88:88:AA:FF:DD'