aboutsummaryrefslogtreecommitdiff
path: root/vps.tf
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-05-28 23:18:16 -0300
committerEuAndreh <eu@euandre.org>2019-05-28 23:18:16 -0300
commitc0c0aa98d88c2a62792ed7b4f9b150774b66d07e (patch)
tree9e5181e7363d94cb8fd8c12cbeb15464c3a68db7 /vps.tf
parentSplit $VPS_COMMIT_SHA variable declaration for exporting (diff)
downloadtoph-c0c0aa98d88c2a62792ed7b4f9b150774b66d07e.tar.gz
toph-c0c0aa98d88c2a62792ed7b4f9b150774b66d07e.tar.xz
Use Floating IP on Droplet
Diffstat (limited to 'vps.tf')
-rw-r--r--vps.tf6
1 files changed, 6 insertions, 0 deletions
diff --git a/vps.tf b/vps.tf
index c5412c3..072fc74 100644
--- a/vps.tf
+++ b/vps.tf
@@ -1,5 +1,6 @@
variable "do_token" {}
variable "ssh_fingerprint" {}
+variable "floating_ip" {}
provider "digitalocean" {
token = "${var.do_token}"
@@ -30,3 +31,8 @@ resource "digitalocean_droplet" "vps" {
script = "./deploy.sh"
}
}
+
+resource "digitalocean_floating_ip_assignment" "vps" {
+ ip_address = "${var.floating_ip}"
+ droplet_id = "${digitalocean_droplet.vps.id}"
+} \ No newline at end of file