Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

priority is required when domain record type is MX or SRV #2561

Closed
tvaughan opened this issue Jun 29, 2015 · 1 comment
Closed

priority is required when domain record type is MX or SRV #2561

tvaughan opened this issue Jun 29, 2015 · 1 comment

Comments

@tvaughan
Copy link

Terraform's DigitialOcean domain_record documentation says that priority is optional. DigitalOcean's API documentation says that priority is required if the domain record type is MX or SRV. When priority is not provided in a terraform plan and it is required by the DigitalOcean API, this is the error:

* Failed to create record: Error creating record: API Error: unprocessable_entity: Priority is not a number and Priority Priority must be an integer between 0 and 65535

Tested on:

$ terraform --version
Terraform v0.5.3
$ lsb_release -a
No LSB modules are available.  
Distributor ID: Ubuntu
Description:    Ubuntu 15.04
Release:        15.04
Codename:       vivid
$ uname -m
x86_64

To reproduce:

resource "digitalocean_domain" "example" {
  ip_address = "127.0.0.1"
  name = "example.com"
}

resource "digitalocean_droplet" "mail" {
  image = "ubuntu-15-04-x64"
  name = "mail.${digitalocean_domain.example.name}"
  region = "nyc1"
  size = "512mb"
  ssh_keys = ["8675309"]
}

resource "digitalocean_record" "mail" {
  domain = "${digitalocean_domain.example.name}"
  name = "mail"
  type = "A"
  value = "${digitalocean_droplet.mail.ipv4_address}"
}

resource "digitalocean_record" "mx" {
  domain = "${digitalocean_domain.example.name}"
  type = "MX"
  value = "${digitalocean_record.mail.name}"
}

I'd like to submit a pull-request to resolve this. Should the DigitalOcean provider require priority, or provide a default value, like 10, when type is MX or SRV? FWIW - I assumed terraform would provide a default.

@ghost
Copy link

ghost commented Apr 11, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants