aboutsummaryrefslogtreecommitdiff
path: root/vps.tf
diff options
context:
space:
mode:
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