Remove unsupported location field from DNS record resource

This commit is contained in:
beatz174-bit
2026-04-29 16:10:50 +10:00
parent 1dbd948a22
commit 5eed12a594
9 changed files with 18 additions and 87 deletions
+3 -4
View File
@@ -6,8 +6,8 @@ This example is an **opt-in live test** for writable Dynu provider functionality
Using a single suffix (`test_suffix`), this example creates five DNS record scenarios under `dynu_root_domain`:
1. `A` record with IPv4 content, `location`, and minimum TTL=90 (`codex-a-<suffix>.<root_domain>`)
2. `AAAA` record with IPv6 content and `location` (`codex-aaaa-<suffix>.<root_domain>`)
1. `A` record with IPv4 content, minimum TTL=90 (`codex-a-<suffix>.<root_domain>`)
2. `AAAA` record with IPv6 content (`codex-aaaa-<suffix>.<root_domain>`)
3. `CNAME` record created disabled (`enabled = false`) (`codex-cname-<suffix>.<root_domain>`)
4. **Dynamic `A` record** with omitted content (`codex-dynamic-a-<suffix>.<root_domain>`)
5. **Dynamic `AAAA` record** with omitted content (`codex-dynamic-aaaa-<suffix>.<root_domain>`)
@@ -32,10 +32,9 @@ Edit `terraform.tfvars` and set at least:
- `dynu_root_domain`
- `test_suffix` (use a unique value per run)
Optional overrides include `test_ipv4`, `test_ipv6`, `test_cname_target`, `test_ttl`, and `test_location`.
Optional overrides include `test_ipv4`, `test_ipv6`, `test_cname_target`, `test_ttl`.
- `test_ttl` must be `0` (provider/API default) or `>= 90`.
- `test_location` applies only to A/AAAA records.
## Run
-2
View File
@@ -19,7 +19,6 @@ resource "dynu_dns_record" "a_ipv4" {
content = var.test_ipv4
ttl = 90
enabled = true
location = var.test_location
}
resource "dynu_dns_record" "aaaa_ipv6" {
@@ -28,7 +27,6 @@ resource "dynu_dns_record" "aaaa_ipv6" {
content = var.test_ipv6
ttl = var.test_ttl
enabled = true
location = var.test_location
}
resource "dynu_dns_record" "cname" {
@@ -14,4 +14,3 @@ test_ipv6 = "2001:db8::123"
test_cname_target = "example.com"
test_ttl = 300
test_location = "us"
@@ -64,9 +64,3 @@ variable "test_ttl" {
type = number
default = 300
}
variable "test_location" {
description = "Optional Dynu location hint for A/AAAA records."
type = string
default = "us"
}
@@ -1,8 +1,7 @@
resource "dynu_dns_record" "a_location_min_ttl" {
resource "dynu_dns_record" "a_enabled_min_ttl" {
hostname = "api.example.com"
record_type = "A"
content = "198.51.100.10"
ttl = 90
enabled = false
location = "us"
}