diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-04 15:50:41 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-04 15:50:41 +0200 |
commit | f484c322b1e1e8c2c0fb7d7f10e80ec9afc400e5 (patch) | |
tree | 9716d8ddc273443c1e30c104e00e3a355e52b24b /digitalocean/domain/main.tf | |
parent | digitalocean/firewall: open ports for UDP also (diff) | |
download | infra-terraform-0.0.5.tar.gz infra-terraform-0.0.5.zip |
digitalocean/domain: support CNAME aliasesv0.0.5
Diffstat (limited to '')
-rw-r--r-- | digitalocean/domain/main.tf | 9 |
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) +} |