Skip to content

Instantly share code, notes, and snippets.

@Craigson
Last active February 3, 2021 05:32
Show Gist options
  • Save Craigson/ec45b153a3e938f0d5bf415ebb5d02cd to your computer and use it in GitHub Desktop.
Save Craigson/ec45b153a3e938f0d5bf415ebb5d02cd to your computer and use it in GitHub Desktop.
Digital Ocean module's main.tf file
resource "digitalocean_droplet" "syntropy_ipfs" {
count = 5
image = "ubuntu-20-04-x64"
name = "ipfs${count.index + 1}"
region = "nyc1"
size = "s-1vcpu-1gb"
private_networking = true
ssh_keys = [
data.digitalocean_ssh_key.syntropy.id
]
connection {
host = self.ipv4_address
user = "root"
type = "ssh"
private_key = file(var.pvt_key)
timeout = "2m"
}
lifecycle {
create_before_destroy = true
}
tags = [element(var.droplet_host_number, count.index)]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment