Giter VIP home page Giter VIP logo

Comments (4)

trilom avatar trilom commented on September 24, 2024

Looked at this today and found the following:

This line is where the issue happens:

nsResponse, err := client.DomainsDNS.GetList(domain)
if err != nil {
return diag.FromErr(err)
}

It calls the GetList endpoint which calls ParseDomain

parsedDomain, err := ParseDomain(domain)
if err != nil {
return nil, err
}

The ParseDomain then throws an error

if !regDomain.MatchString(domain) {
return nil, fmt.Errorf("invalid domain: incorrect format")
}

Based on logs from an import maybe the "domain" var passed to the API needs to be explicitly cast to a string. When import was originally implemented it used a different endpoint that as of 5 months ago runs the same ParseDomain

2021-12-27T07:25:24.598-0500 [TRACE] vertex "namecheap_domain_records.test (import id \"test.domain\")": visit complete

records, err := client.GetHosts(domainParts[len(domainParts)-2] + "." + domainParts[len(domainParts)-1])

from terraform-provider-namecheap.

StyleT avatar StyleT commented on September 24, 2024

Hi!

Thanks for identifying the issue and PR! I'll take a look at it as soon as possible. But likely it's gonna happen somewhere next week or so...

from terraform-provider-namecheap.

StyleT avatar StyleT commented on September 24, 2024

This was fixed in v2.1.0

from terraform-provider-namecheap.

ptous avatar ptous commented on September 24, 2024

A bit late on the response, but I wanted to confirm that the fixed import functionality works very well, pulling in state for all the records in a domain declared in the HCL. This allowed me to easily flesh out HCL that matched the domain's config based on plan differences. My domain configs weren't huge, but they were big enough that I wanted to codify them in case of loss, and this made that possible with confidence. You folks have my sincere thanks.

from terraform-provider-namecheap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.