You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
453 B

resource "digitalocean_tag" "cluster" {
name = "${var.name}"
}
resource "digitalocean_droplet" "cluster" {
name = "${var.name}-node${count.index}"
image = "${var.image_id}"
size = "${var.instance_size}"
region = "${element(var.regions, count.index)}"
ssh_keys = "${var.key_ids}"
count = "${var.servers}"
tags = ["${digitalocean_tag.cluster.id}"]
lifecycle = {
prevent_destroy = false
}
connection {
timeout = "30s"
}
}