terraform: add notes on netlify DNS records
zimbatm committed
Oct 4, 2021 at 15:06 UTC
63528e9fdd4c3e29c167ee75fc0acd0f73b2f02f
1 file changed
+9
-20
terraform/dns.tf
+9
-20
@@ -1,4 +1,10 @@
1
# Our DNS is managed by Netlify
2
+#
3
+# NOTES on the provider:
4
+#
5
+# * NETLIFY and NETLIFY6 resource types are missing because no support
6
+# * The TTL is 3600 everywhere because the "ttl" attribute is not supported
7
+# * The MX records both have 10 priority because no support
8
9
locals {
10
# Shortcut to keep this a bit leaner
@@ -168,24 +174,6 @@ resource "netlify_dns_zone" "nixos" {
174
name = "nixos.org"
175
}
176
171
-# Import fails on all types with:
172
-#
173
-# Error: &{0 } (*models.Error) is not supported by the TextConsumer, can be resolved by supporting TextUnmarshaler interface
174
-#
175
-# resource "netlify_dns_record" "nixos" {
176
-# zone_id = local.zone_id
177
-#
178
-# hostname = "nixos.org"
179
-# type = "NETLIFY"
180
-# value = "nixos-homepage.netlify.com"
181
-# }
182
-#
183
-# New entries can be created if they are not of NETLIFY type.
184
-#
185
-# TTL is not supported.
186
-
187
-# netlify api getDnsRecords -d '{ "zone_id": "5e6ce1b8b6f808aa16acd1ff" }'
188
-
177
resource "netlify_dns_record" "nixos" {
178
for_each = { for v in local.dns_records : "${v.hostname}-${v.type}" => v }
179
zone_id = local.zone_id
@@ -194,8 +182,9 @@ resource "netlify_dns_record" "nixos" {
182
value = each.value.value
183
}
184
197
-# FIXME: both records have the same priority because the provider doesn't
198
-# support the "priority" argument.
185
+# MX records both have the same hostname and type and would clash on the above
186
+# mapping.
187
+
188
resource "netlify_dns_record" "nixos_MX1" {
189
zone_id = local.zone_id
190
hostname = "nixos.org"