diff options
author | EuAndreh <eu@euandre.org> | 2019-06-08 11:47:35 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-06-08 11:47:35 -0300 |
commit | b68d0769986b847f76e1da54446ac6a2a1cb96d0 (patch) | |
tree | 482bfb5c4f0f2f396f09214209fa33d87f5c5789 /vps.tf | |
parent | TODOs.org (diff) | |
download | server-b68d0769986b847f76e1da54446ac6a2a1cb96d0.tar.gz server-b68d0769986b847f76e1da54446ac6a2a1cb96d0.tar.xz |
Provision DNS entries with Terraform! :tada:
Before all the DNS entries had to be entered manually on the web UI.
Diffstat (limited to 'vps.tf')
-rw-r--r-- | vps.tf | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -55,3 +55,25 @@ resource "digitalocean_volume_attachment" "foobar" { volume_id = "${digitalocean_volume.vps_persistent_volume.id}" droplet_id = "${digitalocean_droplet.vps.id}" } + +locals { + cname_subdomains = [ + "${var.wallabag_tld}", + "${var.nextcloud_tld}", + ] +} + +resource "godaddy_domain_record" "vps_tld" { + domain = "${var.tld}" + addresses = ["${var.floating_ip}"] + + dynamic "record" { + for_each = local.cname_subdomains + + content { + type = "CNAME" + name = tag + data = "${var.tld}" + } + } +}
\ No newline at end of file |