Archived
ci / test (push) Failing after 5m55s
- DYNU_API_KEY env var fallback in provider config - dynu_domain resource: add 9 computed attributes (unicode_name, ipv4/ipv6 flags, wildcard aliases, allow_zone_transfer, dnssec, created_on, updated_on) - dynu_dns_records data source: add 6 type-specific fields (priority, weight, port, flags, tag, value) - Fix normalizeRecordContentForState for MX/SRV/NS/PTR (read host field) and CAA (read value field) to avoid plan/state inconsistency - Allow underscore-prefixed DNS labels in hostname validator (RFC 2782 SRV) - Preserve plan/state hostname across create/update/read to prevent inconsistent result errors when API returns full FQDN for node_name-style records - Update all version references from 0.1.0 to 0.2.0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LFZyrmtKsezBwFWGTWsb2y
94 lines
1.9 KiB
Terraform
94 lines
1.9 KiB
Terraform
terraform {
|
|
required_providers {
|
|
dynu = {
|
|
source = "beatz174-bit/dynu"
|
|
version = "~> 0.2.0"
|
|
}
|
|
}
|
|
}
|
|
|
|
provider "dynu" {
|
|
api_key = var.dynu_api_key
|
|
}
|
|
|
|
resource "dynu_domain" "test" {
|
|
name = var.test_domain
|
|
}
|
|
|
|
resource "dynu_dns_record" "a" {
|
|
hostname = "a.${var.test_domain}"
|
|
record_type = "A"
|
|
content = "192.0.2.10"
|
|
ttl = var.test_ttl
|
|
enabled = true
|
|
|
|
depends_on = [dynu_domain.test]
|
|
}
|
|
|
|
resource "dynu_dns_record" "aaaa" {
|
|
hostname = "aaaa.${var.test_domain}"
|
|
record_type = "AAAA"
|
|
content = "2001:db8::10"
|
|
ttl = var.test_ttl
|
|
enabled = true
|
|
|
|
depends_on = [dynu_domain.test]
|
|
}
|
|
|
|
resource "dynu_dns_record" "cname" {
|
|
hostname = "www.${var.test_domain}"
|
|
record_type = "CNAME"
|
|
content = "target.${var.test_domain}"
|
|
ttl = var.test_ttl
|
|
enabled = true
|
|
|
|
depends_on = [dynu_domain.test]
|
|
}
|
|
|
|
resource "dynu_dns_record" "mx" {
|
|
hostname = var.test_domain
|
|
record_type = "MX"
|
|
content = "mail.${var.test_domain}"
|
|
priority = 10
|
|
ttl = var.test_ttl
|
|
enabled = true
|
|
|
|
depends_on = [dynu_domain.test]
|
|
}
|
|
|
|
resource "dynu_dns_record" "txt" {
|
|
hostname = "txt.${var.test_domain}"
|
|
record_type = "TXT"
|
|
content = "v=spf1 include:example.com -all"
|
|
ttl = var.test_ttl
|
|
enabled = true
|
|
|
|
depends_on = [dynu_domain.test]
|
|
}
|
|
|
|
resource "dynu_dns_record" "srv" {
|
|
hostname = "_sip._tcp.${var.test_domain}"
|
|
record_type = "SRV"
|
|
content = "target.${var.test_domain}"
|
|
priority = 10
|
|
weight = 5
|
|
port = 5060
|
|
ttl = var.test_ttl
|
|
enabled = true
|
|
|
|
depends_on = [dynu_domain.test]
|
|
}
|
|
|
|
resource "dynu_dns_record" "caa" {
|
|
hostname = var.test_domain
|
|
record_type = "CAA"
|
|
content = "letsencrypt.org"
|
|
flags = 0
|
|
tag = "issue"
|
|
value = "letsencrypt.org"
|
|
ttl = var.test_ttl
|
|
enabled = true
|
|
|
|
depends_on = [dynu_domain.test]
|
|
}
|