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

  1. resource "digitalocean_tag" "cluster" {
  2. name = "${var.name}"
  3. }
  4. resource "digitalocean_droplet" "cluster" {
  5. name = "${var.name}-node${count.index}"
  6. image = "${var.image_id}"
  7. size = "${var.instance_size}"
  8. region = "${element(var.regions, count.index)}"
  9. ssh_keys = "${var.key_ids}"
  10. count = "${var.servers}"
  11. tags = ["${digitalocean_tag.cluster.id}"]
  12. lifecycle = {
  13. prevent_destroy = false
  14. }
  15. connection {
  16. timeout = "30s"
  17. }
  18. }