Skip to content

SuperBuker/terraform-provider-dns-he-net

Repository files navigation

Terraform Provider: Hurricane Electric DNS

Actions Status codecov Go Report Card GitHub release Terraform registry downloads License

Terraform Provider for setting DNS records in Hurricane Electric.

Usage

Terraform Registry

The documentation can be found at registry.terraform.io.

Examples can be found in the examples folder.

Provider Configuration

terraform {
  required_providers {
    dns-he-net = {
      source = "SuperBuker/dns-he-net"
    }
  }
}

provider "dns-he-net" {
  username   = "username"
  password   = "password"
  otp_secret = "otp_secret" # optional, only if enabled
  store_type = "encrypted"  # optional, default: "encrypted"
}

resource "dns-he-net_a" "example" {
  zone_id = 123456
  domain  = "example.com"
  ttl     = 86400
  data    = "1.2.3.4"
}

Then run terraform init to download and install the provider.

Development

Requirements

  • Go 1.20 (to build the provider plugin)
  • Terraform >= v1.0

Building the Provider

Clone the repository.

$ git clone [email protected]:SuperBuker/terraform-provider-dns-he-net.git

Enter the provider directory and build the provider

$ cd ./terraform-provider-dns-he-net
$ go build -o terraform-provider-dns-he-net

Testing

Everything related with testing is available in the testing folder.

Bug reports are welcome. 😉

Installing the Provider

After the build is complete, copy the binary into the ~/.terraform.d/plugins directory

$ cp ./terraform-provider-dns-he-net ~/.terraform.d/plugins/terraform-provider-dns-he-net

Contribute

If you'd like to thank the developers behind this project leave a GitHub Star and spread the word.
This is just a humble hobby project, we are not looking for donations.

License

GPLv3

References