Fix Dynu brownfield generator output handling

This commit is contained in:
beatz174-bit
2026-05-13 06:37:10 +10:00
parent 306e2c14db
commit 9de1bee542
2 changed files with 73 additions and 5 deletions
+37
View File
@@ -70,3 +70,40 @@ The helper script writes these files under `generated/`:
- `generated/import-dynu-dns-records.sh`
These are generated outputs meant for operator review before use in production.
## Troubleshooting
### Error: `'"'"'dynu_dns_records'"'"'`
Cause:
The helper script reads `terraform output -json` and expects an output named `dynu_dns_records`.
Fix:
```bash
cd infrastructure/terraform/dynu
terraform init
terraform apply -refresh-only
terraform output -json | jq 'keys'
```
Confirm `dynu_dns_records` appears in the key list.
If it does not, check that the Terraform config contains:
```hcl
data "dynu_dns_records" "root" {
hostname = var.dynu_root_domain
}
output "dynu_dns_records" {
value = data.dynu_dns_records.root.records
}
```
Then rerun:
```bash
python3 scripts/generate-brownfield-records.py --dry-run
```