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

UltraDNS Provider #2716

Merged
merged 0 commits into from
Mar 18, 2016
Merged

UltraDNS Provider #2716

merged 0 commits into from
Mar 18, 2016

Conversation

jmasseo
Copy link
Contributor

@jmasseo jmasseo commented Jul 13, 2015

I've implemented a simple UltraDNS provider that can manage DNS records with UltraDNS' REST API.
I've included documentation and acceptance tests.

It is 'inspired' by the DNSimple provider.

@josephholsten
Copy link
Contributor

👍 it's even got docs!

@phinze
Copy link
Contributor

phinze commented Jul 14, 2015

On first glance this looks great! Will do a full review sometime this week.

@jtpace
Copy link

jtpace commented Jul 18, 2015

What's left for getting this added to the official project?

@Pryz
Copy link
Contributor

Pryz commented Aug 17, 2015

Any update of this PR ?

@@ -0,0 +1 @@
package main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to include the empty test file here.

@phinze
Copy link
Contributor

phinze commented Sep 4, 2015

Alright @jmasseo - finally got around to doing a proper review on this. Made a bunch of comments in line for you, but on the whole this is coming along nicely!

@josephholsten
Copy link
Contributor

This patch is failing due to go vet failing for other files.

@josephholsten
Copy link
Contributor

@phinze this is ready for your 👀

@radeksimko
Copy link
Member

@josephholsten

This patch is failing due to go vet failing for other files.

The failure coming from tests is related to this PR and needs fixing before someone starts reviewing it:

# github.com/hashicorp/terraform/builtin/providers/ultradns
builtin/providers/ultradns/resource_ultradns_record.go:91: undefined: ErrorResponse
builtin/providers/ultradns/resource_ultradns_record.go:99: no new variables on left side of :=

@josephholsten
Copy link
Contributor

@radeksimko indeed it was.

@phinze all fixed now, and with much better error handling.

@josephholsten
Copy link
Contributor

rebased again. @phinze, @radeksimko ready for your 👓


if v := os.Getenv("ULTRADNS_DOMAIN"); v == "" {
t.Fatal("ULTRADNS_DOMAIN must be set for acceptance tests. The domain is used to create and destroy record against.")
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable says DOMAIN here but it's BASEURL in the provider config. Is there a difference?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the DOMAIN is specified for the test. This is the domain it will perform the test operation with in resource_ultradns_record_test.go. BASEURL specifies if it should use production or the development sandbox.

@phinze
Copy link
Contributor

phinze commented Nov 2, 2015

Okay one more review pass w/ a few questions, nearly there!

@josephholsten
Copy link
Contributor

ok, async work has been done. @phinze, @radeksimko ready for your 👓

we've got some more advanced features in the pipe, would be nice to get these basics merged before we start a ticket for the new shiny.

@phinze
Copy link
Contributor

phinze commented Jan 20, 2016

@josephholsten Still not seeing any resource.Retry polling on this PR - possible some commits didn't make it to the right spot?

Also, can somebody could point me in the direction of the account that we'd need to sign up for to to properly set up Travis to run nightly tests? I want to make sure we pick up the correct account type.

@phinze phinze added the waiting-response An issue/pull request is waiting for a response from the community label Jan 20, 2016
@josephholsten
Copy link
Contributor

@phinze oh, @jmasseo put the async handling into the sdk. Does the async stuff need to be visible to tf to play nice? Or is it cool that it's abstracted away?

@phinze
Copy link
Contributor

phinze commented Jan 21, 2016

Ah okay, didn't catch that part. That's nicer! Will give it one more pass through and pull it in. 👍 🚢

@phinze
Copy link
Contributor

phinze commented Jan 21, 2016

(Also @josephholsten did you have any knowledge you could share on the account type necessary to acceptance test this provider?)

@jen20
Copy link
Contributor

jen20 commented Jan 25, 2016

@phinze I've signed up for an UltraDNS account to get acceptance tests running at our end for this; looks like it will take a few hours, so I'll come back to it later. Code LGTM (following reasonably extensive review I guess that shouldn't be a surprise!) though.

@jen20
Copy link
Contributor

jen20 commented Jan 25, 2016

Unfortunately it seems we either don't have the correct type of account, or have a credentials issue:

=== RUN   TestAccUltraDNSRecord_Updated
ResCode: 401 Body: {"errorCode":60001,"errorMessage":"invalid_grant:Invalid username & password combination.","error":"invalid_grant","error_description":"60001: invalid_grant:Invalid username & password combination."}
--- FAIL: TestAccUltraDNSRecord_Updated (0.19s)
    testing.go:148: Step 0 error: Error refreshing: 1 error(s) occurred:

        * Error setting up client: POST https://test-restapi.ultradns.com/v1/authorization/token: 401 60001 invalid_grant:Invalid username & password combination.

I have contacted UltraDNS support in the hope they can help us establish which account type or credentials we need to use. @josephholsten or @jmasseo, might either of you be able to shed any light on this?

@jen20 jen20 removed waiting-response An issue/pull request is waiting for a response from the community wip labels Jan 25, 2016
@jmasseo
Copy link
Contributor Author

jmasseo commented Jan 26, 2016

The sandbox does not update from their production system very frequently. They just recently updated it for the first time in several months. We may have to bother them to force a sync to the testing environment for your credentials to work. I had to do a lot of my development testing against production credentials because the sandbox is so wonky. I have made a lot of changes to the SDK to provide robustness against UltraDNS weirdness as well, and will be pushing that changeset over to the SDK when I'm finished this week. Then I have a few more changes to make to this branch to add support for the fancy geo features that UltraDNS supports.

@jen20
Copy link
Contributor

jen20 commented Jan 27, 2016

Hi @jmasseo - thanks for the update. It turns out API access is only provided with enterprise accounts so we don't really have any way to test this. We're hoping to start a discussion with UltraDNS about whether this is a possibility. One other possibility, though less nice, is to split this out into it's own repository as a third party provider. We can aim to make some kind of decision on this soon - sorry for the delay in reviewing!

@jmasseo
Copy link
Contributor Author

jmasseo commented Feb 1, 2016

I've reached out to UltraDNS and heard back and they are trying to work on some API accounts for us.

@jmasseo
Copy link
Contributor Author

jmasseo commented Feb 11, 2016

Who from the terraform team would end up being the custodian of the acceptance tests account for terraform? @phinze @jen20

@phinze
Copy link
Contributor

phinze commented Feb 11, 2016

@jmasseo - if you shoot an email to terraform at hashicorp we can chat about it!

@phinze
Copy link
Contributor

phinze commented Mar 16, 2016

Just noting out here that I bumped a thread w/ @jmasseo today - hoping to get this landed soon!

@josephholsten
Copy link
Contributor

I was rebasing this branch up to master and somehow it's marked as merged. re-opening...

@lwander
Copy link
Contributor

lwander commented Mar 18, 2016

Seems to be a bug, it was somehow merged after I merged this one: #5715

@josephholsten josephholsten mentioned this pull request Mar 18, 2016
@josephholsten
Copy link
Contributor

ok, the actual patch now lives at #5716

@phinze
Copy link
Contributor

phinze commented Mar 18, 2016

@josephholsten yeah we're trying to figure out what happened here heh. Just confirmed that the UDNS code did not in fact land on master.

@josephholsten
Copy link
Contributor

And this is why you should never rewrite history while wearing emperor's attire in public.

@ghost
Copy link

ghost commented Apr 27, 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 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants