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

can't set priority to 0 for mx in digitalocean_record #6

Closed
hashibot opened this issue Jun 13, 2017 · 4 comments
Closed

can't set priority to 0 for mx in digitalocean_record #6

hashibot opened this issue Jun 13, 2017 · 4 comments
Labels
bug do-api Depends on changes to the DigitalOcean API fixed-in-main Fixed in main, but not yet released

Comments

@hashibot
Copy link

This issue was originally opened by @dmitryint as hashicorp/terraform#5069. It was migrated here as part of the provider split. The original body of the issue is below.


Terraform v0.6.11

resource "digitalocean_record" "mx_1" {
    domain = "host.com"
    type = "MX"
    priority = 0
    value = "mx.host.com."
}

When I try to set the priority 0 MX record occurs error message.

Failed to create record: POST https://api.digitalocean.com/v2/domains/host.com/records: 422 Priority is not a number and Priority Priority must be an integer between 0 and 65535

When I changing the priority to another number, e.g. 10, then everything is OK.

Same problem with weight

@hashibot hashibot added the bug label Jun 13, 2017
@hashibot
Copy link
Author

This comment was originally opened by @stack72 as hashicorp/terraform#5069 (comment). It was migrated here as part of the provider split. The original comment is below.


This is due to a known issue and will be worked on in #5694

@andrewsomething
Copy link
Member

This happens because godo was dropping the 0 as an empty value when marshalling to JSON. This was addressed in: digitalocean/godo#164 So a newer version of godo needs to be vendored.

@KibaFox
Copy link

KibaFox commented Jul 5, 2018

I'm running into this issue too. Unfortunately, digitalocean/godo#164 was merged into that project's master branch after v1.3.0 was tagged (the latest tagged release currently).

@andrewsomething andrewsomething added fixed-in-main Fixed in main, but not yet released do-api Depends on changes to the DigitalOcean API labels Sep 7, 2018
@andrewsomething
Copy link
Member

I'm happy to say that yesterday, we release version 1.0.0 of the DigitalOcean Terraform provider. It should include a fix for this issue.

You can find the full changelog here: https://github.com/terraform-providers/terraform-provider-digitalocean/blob/master/CHANGELOG.md#100-september-27-2018

In order to upgrade an existing project to the latest version, run:

terraform init -upgrade

If you believe that this issue is being closed by mistake or the problem has not been resolved, please let me know or feel free to open a new issue with additional details.

Thanks for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug do-api Depends on changes to the DigitalOcean API fixed-in-main Fixed in main, but not yet released
Projects
None yet
Development

No branches or pull requests

3 participants