aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/digitalocean/domain/main.tf
diff options
context:
space:
mode:
Diffstat (limited to 'digitalocean/domain/main.tf')
-rw-r--r--digitalocean/domain/main.tf9
1 files changed, 9 insertions, 0 deletions
diff --git a/digitalocean/domain/main.tf b/digitalocean/domain/main.tf
index a5980ea..f1ebd63 100644
--- a/digitalocean/domain/main.tf
+++ b/digitalocean/domain/main.tf
@@ -14,3 +14,12 @@ resource "digitalocean_record" "a" {
name = "@"
ttl = 3600
}
+
+resource "digitalocean_record" "cname" {
+ type = "CNAME"
+ domain = digitalocean_domain.this.id
+ value = "@"
+ name = each.value
+
+ for_each = toset(var.aliases)
+}