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
Live End-to-End Dynu DNS Zone Example
Warning
This is a live destructive test.
- Do not use a real production domain.
- Use only a disposable test domain.
terraform destroywill remove the test domain and all records created by this example.
This example performs full live validation of the Dynu provider lifecycle by creating and then destroying a disposable Dynu domain plus one DNS record for each currently supported record type in this provider example:
- A
- AAAA
- CNAME
- MX
- TXT
- SRV
- CAA
Prerequisites
- A local build of this provider with Terraform
dev_overridesforbeatz174-bit/dynu. - Dynu API key provided as Terraform variable
dynu_api_key(for example viaterraform.tfvars). - A disposable domain value for
test_domain.
Required variables
Create terraform.tfvars in this folder:
test_domain = "my-disposable-test-domain.example"
dynu_api_key = "..."
Commands
terraform init
terraform validate
terraform plan
terraform apply
terraform plan
terraform destroy
Expected results
terraform validateshould pass.- First
terraform planshould show creation of:- one disposable test domain (
dynu_domain.test), and - one record each for A, AAAA, CNAME, MX, TXT, SRV, and CAA.
- one disposable test domain (
terraform applyshould create the domain and records.- Second
terraform plan(after apply) should show no changes. - Manually verify in the Dynu web UI that the test domain and records exist after apply.
terraform destroyshould remove the test domain and all records from state.- Final manual verification should confirm the test domain is gone from Dynu.