Help us shape the future of Go! Take the 2026 Go Developer Survey

terraform-godaddy

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

README

terraform-godaddy

Terraform plugin for managing domain records (v0.7.10)

Codeship Status for n3integration/terraform-godaddy

API Key

In order to leverage the GoDaddy APIs, an API key is required. The key pair can be optionally stored in environment variables.

export GD_KEY=abc
export GD_SECRET=123

Installation

glide install && go build
mkdir -p ~/.terraform/plugins && cp terraform-godaddy ~/.terraform/plugins
[ -f ~/.terraformrc ] || cat > ~/.terraformrc <<EOF
providers {
  godaddy = "$HOME/.terraform/plugins/terraform-godaddy"
}
EOF

Provider

If key and secret aren't provided under the godaddy provider, they are expected to be exposed as environment variables: GD_KEY and GD_SECRET. If the baseurl is not specified, the standard godaddy api test site is used instead.

provider "godaddy" {
  key = "abc"
  secret = "123"
  baseurl = "https://api.godaddy.com"
}

Domain Record Resource

A godaddy_domain_record resource requires a domain. If the domain is not registered under the account that owns the key, an optional customer number can be specified. Additionally, one or more record instances are required. For each record, the name, type, and data attributes are required. The available types include:

  • A
  • AAAA
  • CNAME
  • NS
  • SOA
  • TXT
resource "godaddy_domain_record" "default" {
  domain = "fancy-domain.com"
  customer = "1234"

  record {
    name = "@"
    type = "A"
    data = "192.168.1.2"
    ttl = 3600
  }

  record {
    name = "@"
    type = "A"
    data = "192.168.1.3"
    ttl = 3600
  }

  record {
    name = "www"
    type = "CNAME"
    data = "fancy.github.io"
    ttl = 3600
  }

  record {
    name = "@"
    type = "NS"
    data = "ns7.domains.com"
    ttl = 3600
  }

  record {
    name = "@"
    type = "NS"
    data = "ns6.domains.com"
    ttl = 3600
  }
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL