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

dyn_record creation returns "404 Not Found" #4862

Closed
anero opened this issue Jan 27, 2016 · 5 comments
Closed

dyn_record creation returns "404 Not Found" #4862

anero opened this issue Jan 27, 2016 · 5 comments

Comments

@anero
Copy link

anero commented Jan 27, 2016

When attempting to create a DNS A record on a non-root zone we get a dyn_record.sentry: Failed to create Dyn record: Bad response, got "404 Not Found"

Our template file looks like this:

provider "dyn" {
    customer_name = "${var.dyn_customer_name}"
    username = "${var.dyn_username}"
    password = "${var.dyn_password}"
}

...

resource "dyn_record" "sentry" {
    zone = "whatever.example.com"
    name = "server"
    value = "${aws_instance.server.public_ip}"
    type = "A"
    ttl = 600
}

We've verified using Dynect's ruby SDK that the credentials set on the provider work on the REST API.

@jen20 jen20 added the bug label Feb 1, 2016
@kevinlondon
Copy link
Contributor

@anero: I hit the same thing just now but there's a workaround. I think Dyn wants to use the TLDs as the primary Zones, so you have to arrange it like this:

resource "dyn_record" "sentry" {
    zone = "example.com"
    name = "server.whatever"
    value = "${aws_instance.server.public_ip}"
    type = "A"
    ttl = 600
}

@anero
Copy link
Author

anero commented Feb 3, 2016

@kevinlondon That did the trick, thanks for the workaround!

@kevinlondon
Copy link
Contributor

One unfortunate side-effect of this is that you can't limit a user to a certain zone. E.g. if you create a user that can only modify whatever.example.com and subnodes, they'll get a 400 if they try to use the workaround I suggested. Instead, you have to give them permissions to modify the example.com zone and subnodes.

@stack72
Copy link
Contributor

stack72 commented Jul 7, 2016

Hi @anero / @kevinlondon

I am going to close this. It seems to be an error with Dyn rather than terraform. Please comment if you feel otherwise

Thanks

Paul

@stack72 stack72 closed this as completed Jul 7, 2016
@ghost
Copy link

ghost commented Apr 24, 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 24, 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

5 participants