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

Import support #21

Open
case opened this issue Jul 30, 2020 · 10 comments · May be fixed by #43
Open

Import support #21

case opened this issue Jul 30, 2020 · 10 comments · May be fixed by #43

Comments

@case
Copy link

case commented Jul 30, 2020

Does the DME provider support terraform import? I didn't see this documented here, or DME's support site.

If not, please consider this a feature request for it.

@jimrubenstein
Copy link

Hey @case -- what kind of resource are you looking to import?

I just spent the day modifying the provider to import a dns record, and I was considering putting together a PR for it...

I could share it with you if you're interested (and need to import dme_dns_record resources). I think it'd be pretty easy to use it as a guide on how to import dme_domain records as well, if you need that. As far as the other resource types, I don't use them really so I'm not sure what it'd entail...

@case
Copy link
Author

case commented Jul 31, 2020

Hi Jim, Secondary DNS is what we wanted to import.

@garyalex
Copy link

I am also looking for the import feature. This is mainly for DNS records and domains.

@jimrubenstein
Copy link

@garyalex i've got some import support for dns records working in a local build.

I've found that this provider has poor support for managing apex records, so I need to spend some more time looking at that and properly managing the state comparison, API reads and API lookups for the apex.

In my local build, I've also got some overwriting features built to facilitate managing DNS that pre-dates the terraform config.

To elaborate: DNSME's API uses different verbs for CREATE and UPDATE operations (that's fine), but it creates a challenge because if you want to write a record that already exists, you have to either a) delete the record or b) import it or c) overwrite it.

So, an alternative would be to just clobber the existing record in DNSME by forcing an overwrite. The implementation of this within this provider is not elegant, and I haven't really been able to test it beyond our use case, but it's been working well for us in our limited deployment. I'd like to add the ability to specify whether you want this behavior on a dns record, rather than assuming it's always desired (since it's a destructive change).

I'm trying to find a few free hours to polish up those features and submit them back here as PRs.

@garyalex
Copy link

@jimrubenstein Thanks for this. If I can help testing please let me know.

@avijitsvmk
Copy link

I've been trying to import a domain, but it seems it's still not implemented. Any idea when it'll be added?

@johntdyer
Copy link

Ditto , this is blocking my adoption of this provider

@thalin
Copy link

thalin commented Jul 20, 2023

I have a bunch of existing domains and records in DME, but I would like to start using Terraform to manage these. Unfortunately it seems that doing that will require destroying all of the existing records and recreating them using Terraform, which is a big pain. I would like to import them instead, but the provider doesn't support import. This seems like a pretty important feature to have if you're not starting from scratch, which I imagine most people will not be. Am I missing something here?

@jimrubenstein
Copy link

tbh we abandoned dme a couple years ago because their API support was incredibly limited and expensive. we were supporting a few dozen domains, and after all the supporting records would easily cap out their API limits.

not really the answer y'all are/were looking for, but that's probably why no one is pushing forward on support for this provider. because they limit API usage severely for any medium sized, or larger, deployment. which makes using something like terraform a pretty non starter.

@Tensho
Copy link

Tensho commented Dec 8, 2023

@jimrubenstein Do you mind elaborating a bit more about API limits? I want to invest some of my time in implementing the resource import feature as we manually manage a dozen domains in DME.

@Tensho Tensho linked a pull request Dec 12, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants