aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-06-11 11:51:07 -0300
committerEuAndreh <eu@euandre.org>2019-06-11 11:51:07 -0300
commit2746aca8bab4296a82f96af0a0a9f5a3bca0bd5f (patch)
tree3a20e860003ea71bb2ef61d675c68bc3750f594d
parentTODOs.org (diff)
downloadserver-2746aca8bab4296a82f96af0a0a9f5a3bca0bd5f.tar.gz
server-2746aca8bab4296a82f96af0a0a9f5a3bca0bd5f.tar.xz
Comment sections of vps.tf
-rw-r--r--vps.tf8
1 files changed, 8 insertions, 0 deletions
diff --git a/vps.tf b/vps.tf
index a329bcf..e120437 100644
--- a/vps.tf
+++ b/vps.tf
@@ -1,3 +1,5 @@
+# Input variables
+
variable "do_token" {
type = "string"
description = "DigitalOcean API token."
@@ -18,6 +20,8 @@ variable "nextcloud_tld_prefix" {
description = "DNS prefix used for the Nextcloud installation. Does not contain a dot at the end."
}
+# DigitalOcean
+
provider "digitalocean" {
token = "${var.do_token}"
version = "~> 1.1"
@@ -28,6 +32,8 @@ resource "digitalocean_ssh_key" "client" {
public_key = "${file("${path.module}/secrets/ssh/vps-box-client.pub")}"
}
+## Droplet and volume
+
resource "digitalocean_droplet" "vps" {
image = "ubuntu-18-04-x64"
name = "sovereignty"
@@ -68,6 +74,8 @@ resource "digitalocean_volume_attachment" "foobar" {
droplet_id = "${digitalocean_droplet.vps.id}"
}
+## DNS and IP configuration
+
resource "digitalocean_floating_ip" "vps_public_ip" {
region = "${digitalocean_droplet.vps.region}"
}