This repository has been archived on 2026-08-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.

terraform-provider-dynu

A standalone Terraform provider for Dynu DNS data.

Current phase: read-only. This provider supports provider configuration and data sources only.

Feature scope

Implemented:

  • Provider authentication via API key
  • Environment variable support (DYNU_API_KEY)
  • Read-only data sources:
    • dynu_domains
    • dynu_domain
    • dynu_dns_records

Not implemented in this phase:

  • Terraform resources
  • Any create/update/delete operations

Requirements

  • Terraform >= 1.5
  • Go >= 1.23 (for building and testing)
  • Dynu API key

Provider configuration

provider "dynu" {
  api_key = var.dynu_api_key
}

variable "dynu_api_key" {
  type      = string
  sensitive = true
}

You can omit api_key in Terraform configuration and set the environment variable instead:

export DYNU_API_KEY="your-dynu-api-key"

Data source usage

dynu_domains

data "dynu_domains" "all" {}

dynu_domain

data "dynu_domain" "selected" {
  hostname = "www.example.com"
}

dynu_dns_records

data "dynu_dns_records" "records" {
  hostname = "www.example.com"
}

Build

go build ./...

Test

Run formatting and unit tests:

./scripts/check.sh

Or run unit tests directly:

go test ./...

Acceptance tests

Acceptance tests are opt-in and require live Dynu credentials.

TF_ACC=1 DYNU_API_KEY="your-dynu-api-key" ./scripts/testacc.sh

Optional environment variable:

  • DYNU_DOMAIN (for future domain-specific acceptance test cases)

Developer workflow

  • ./scripts/setup-dev.sh validates required local tools
  • ./scripts/check.sh runs formatting and unit checks
  • ./scripts/testacc.sh runs acceptance tests

Repository-local Codex helpers are also available under codex/ for agent-oriented workflows.

Limitations

  • Read-only provider phase only
  • No writable Terraform resources yet
S
Description
No description provided
Readme Apache-2.0
43 MiB
Languages
Go 89.2%
Shell 10.8%