Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/n3integration/terraform-provider-godaddy
A terraform plugin for managing godaddy domain records
https://github.com/n3integration/terraform-provider-godaddy
go godaddy infrastructure-as-code terraform
Last synced: 28 days ago
JSON representation
A terraform plugin for managing godaddy domain records
- Host: GitHub
- URL: https://github.com/n3integration/terraform-provider-godaddy
- Owner: n3integration
- License: apache-2.0
- Created: 2016-11-11T00:05:29.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T22:57:03.000Z (almost 2 years ago)
- Last Synced: 2024-08-03T23:29:30.919Z (4 months ago)
- Topics: go, godaddy, infrastructure-as-code, terraform
- Language: Go
- Homepage:
- Size: 144 KB
- Stars: 152
- Watchers: 8
- Forks: 53
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - terraform-provider-godaddy
- awesome-golang-repositories - terraform-provider-godaddy
README
# terraform-provider-godaddy
[Terraform](https://www.terraform.io/) plugin for managing domain records[![Release Status for n3integration/terraform-provider-godaddy](https://github.com/n3integration/terraform-provider-godaddy/workflows/release/badge.svg)](https://github.com/n3integration/terraform-provider-godaddy/actions)
[![Codeship Status for n3integration/terraform-provider-godaddy](https://app.codeship.com/projects/29e8c490-8b5d-0134-914d-3e63d62140d1/status?branch=master)](https://app.codeship.com/projects/184616)
- Terraform v1.3.0
- https://github.com/n3integration/terraform-provider-godaddy/releases/tag/v1.9.0
- Terraform v0.14.x
- https://github.com/n3integration/terraform-provider-godaddy/releases/tag/v1.8.7
- Terraform v0.12.x
- https://github.com/n3integration/terraform-provider-godaddy/releases/tag/v1.7.3
- Terraform v0.11.x
- https://github.com/n3integration/terraform-provider-godaddy/releases/tag/v1.6.4
- Terraform v0.10.x
- https://github.com/n3integration/terraform-provider-godaddy/releases/tag/v1.5.0
- Terraform v0.9.x
- https://github.com/n3integration/terraform-provider-godaddy/releases/tag/v1.3.0
- Terraform v0.8.x
- https://github.com/n3integration/terraform-provider-godaddy/releases/tag/v1.2.3
- Terraform v0.7.x
- https://github.com/n3integration/terraform-provider-godaddy/releases/tag/v1.0.0
### Installation steps for Terraform Cloud
1. Download the latest `linux_amd64` release from https://github.com/n3integration/terraform-provider-godaddy/releases
2. Unpack to `/terraform.d/plugins/linux_amd64`.
3. Rename to match naming scheme: `terraform-provider-_vX.Y.Z` https://www.terraform.io/docs/configuration/providers.html#third-party-plugins
4. Run `terraform init` to make sure the provider is initialized properly.
## API Key
In order to leverage the GoDaddy APIs, an [API key](https://developer.godaddy.com/keys/) is required. The key pair can be optionally stored in environment variables.
```bash
export GODADDY_API_KEY=abc
export GODADDY_API_SECRET=123
```
## Provider
If `key` and `secret` aren't provided under the `godaddy` `provider`, they are expected to be exposed as environment variables: `GODADDY_API_KEY` and `GODADDY_API_SECRET`.
```terraform
provider "godaddy" {
key = "abc"
secret = "123"
}
```
## 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. `MX` records can optionally specify `priority` or will default to `0`. Address and NameServer records can be
defined using shorthand-notation as `addresses = [""]` or `nameservers = [""]`, respectively unless you need to override the default time-to-live (3600). The available record
types include:
* A
* AAAA
* CAA
* CNAME
* MX
* NS
* SOA
* SRV
* TXT
```terraform
resource "godaddy_domain_record" "gd-fancy-domain" {
domain = "fancy-domain.com"
// required if provider key does not belong to customer
customer = "1234"
// specify zero or more record blocks
// a record block allows you to configure A, or NS records with a custom time-to-live value
// a record block also allow you to configure AAAA, CNAME, TXT, or MX records
record {
name = "www"
type = "CNAME"
data = "fancy.github.io"
ttl = 3600
}
record {
name = "@"
type = "MX"
data = "aspmx.l.google.com."
ttl = 600
priority = 1
}
record {
name = "@"
type = "SRV"
data = "host.example.com"
ttl = 3600
service = "_ldap"
protocol = "_tcp"
port = 389
}
// specify any A records associated with the domain
addresses = ["192.168.1.2", "192.168.1.3"]
// specify any custom nameservers for your domain
// note: godaddy now requires that the 'custom' nameservers are first supplied through the ui
nameservers = ["ns7.domains.com", "ns6.domains.com"]
}
```
## Building for Linux
```bash
make linux
```
### Additional Information
If your zone contains existing data, please ensure that your Terraform resource configuration includes all existing records, otherwise they will be removed.
This plugin also supports Terraform's [import](https://www.terraform.io/docs/import/usage.html) feature. This will at least allow you to determine the changes introduced
through `terraform plan` and update the resource configuration accordingly to preserve existing data. The supplied resource `id` to the `terraform import` command should
be the name of the domain that you would like to import. Although this is currently a manual workaround, this plugin will be updated when Terraform includes support for
fully automated imports.
#### Import Example
```bash
terraform import godaddy_domain_record.gd-fancy-domain fancy-domain.com
```
## License
Copyright 2023 [email protected]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.