github.com/noirx94/tendermintmp@v0.0.1/networks/remote/terraform/cluster/main.tf (about)

     1  resource "digitalocean_tag" "cluster" {
     2    name = "${var.name}"
     3  }
     4  
     5  resource "digitalocean_ssh_key" "cluster" {
     6    name       = "${var.name}"
     7    public_key = "${file(var.ssh_key)}"
     8  }
     9  
    10  resource "digitalocean_droplet" "cluster" {
    11    name = "${var.name}-node${count.index}"
    12    image = "centos-7-x64"
    13    size = "${var.instance_size}"
    14    region = "${element(var.regions, count.index)}"
    15    ssh_keys = ["${digitalocean_ssh_key.cluster.id}"]
    16    count = "${var.servers}"
    17    tags = ["${digitalocean_tag.cluster.id}"]
    18  
    19    lifecycle = {
    20  	prevent_destroy = false
    21    }
    22  
    23    connection {
    24      timeout = "30s"
    25    }
    26  
    27  }
    28