aboutsummaryrefslogtreecommitdiff
path: root/vps.tf
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-05-25 13:24:58 -0300
committerEuAndreh <eu@euandre.org>2019-05-25 13:24:58 -0300
commit5d35c71c2d7e6aeabffe750f43d4345ac466b52a (patch)
tree598292c721723f66af316131ae0cf1daba8097c6 /vps.tf
parentCheck-in Terraform .tfstate files using git-crypt (diff)
downloadtoph-5d35c71c2d7e6aeabffe750f43d4345ac466b52a.tar.gz
toph-5d35c71c2d7e6aeabffe750f43d4345ac466b52a.tar.xz
Format vps.tf
Diffstat (limited to 'vps.tf')
-rw-r--r--vps.tf29
1 files changed, 16 insertions, 13 deletions
diff --git a/vps.tf b/vps.tf
index e5f0884..31d247e 100644
--- a/vps.tf
+++ b/vps.tf
@@ -2,36 +2,39 @@ variable "do_token" {}
variable "ssh_fingerprint" {}
provider "digitalocean" {
- token = "${var.do_token}"
+ token = "${var.do_token}"
version = "~> 1.1"
}
resource "digitalocean_droplet" "vps" {
- image = "ubuntu-18-04-x64"
- name = "sovereignty"
- region = "nyc3"
- size = "512mb"
- backups = true
- ipv6 = true
+ image = "ubuntu-18-04-x64"
+ name = "sovereignty"
+ region = "nyc3"
+ size = "512mb"
+ backups = true
+ ipv6 = true
monitoring = true
+
ssh_keys = [
- "${var.ssh_fingerprint}"
+ "${var.ssh_fingerprint}",
]
connection {
- user = "root"
- type = "ssh"
+ user = "root"
+ type = "ssh"
private_key = "${file("${path.module}/secrets/id_rsa")}"
- timeout = "2m"
+ timeout = "2m"
}
# FIXME
provisioner "remote-exec" {
inline = [
"export PATH=$PATH:/usr/bin",
+
# install nginx
"sudo apt-get update",
- "sudo apt-get -y install nginx"
+
+ "sudo apt-get -y install nginx",
]
}
-} \ No newline at end of file
+}