Giter VIP home page Giter VIP logo

Comments (12)

OGProgrammer avatar OGProgrammer commented on September 24, 2024 3

Did not work and corrupted state file. (note address period not there)

resource "namecheap_record" "aws-dkim2-shouthouse-com" {
  name = "ru3x3psqyrikzewp4xxxxxxxxfclzw._domainkey"
  domain = "shouthouse.com"
  address = "ru3x3psqyrikzewp4dxxxxxfclzw.dkim.amazonses.com"
  type = "CNAME"
}

Worked

resource "namecheap_record" "aws-dkim2-shouthouse-com" {
  name = "ru3x3psqyrikzewp4xxxxxxxxfclzw._domainkey"
  domain = "shouthouse.com"
  address = "ru3x3psqyrikzewp4dxxxxxfclzw.dkim.amazonses.com."
  type = "CNAME"
}

from terraform-provider-namecheap.

ifree92 avatar ifree92 commented on September 24, 2024 3

Due to complete project refactoring, I'm closing this issue.
Refer to #46 to get more details.

@AlexFBP Unfortunately, the previous version did not support MX records at all.
You're welcome to try a new https://registry.terraform.io/providers/namecheap/namecheap/latest v2 major release.

I trust https://registry.terraform.io/providers/namecheap/namecheap/latest/docs/guides/namecheap_domain_records_guide#email-type this will be helpful for you to set MX records.

Cheers 🥂

from terraform-provider-namecheap.

OGProgrammer avatar OGProgrammer commented on September 24, 2024 2

Not sure dude, when I have time I can look but this isn't a blocker for me. Recorded issue to help others who may run into this in the meantime until we can figure out what to do.

from terraform-provider-namecheap.

aj-foster avatar aj-foster commented on September 24, 2024 2

Thank you @AlexFBP — that terraform state rm command helped resolve things quickly when I forgot the trailing period in a CNAME record just now while working with remote state.

from terraform-provider-namecheap.

OGProgrammer avatar OGProgrammer commented on September 24, 2024 1

Same thing seems to happen when you put in an invalid CNAME record also. I just added a CNAME record but forgot the period at the end of the address and was getting the same hash errors unless I manually removed them from state file.

from terraform-provider-namecheap.

adamdecaf avatar adamdecaf commented on September 24, 2024

Can you share what gets messed up? Is the resource added to the state file when it shouldn't be?

from terraform-provider-namecheap.

OGProgrammer avatar OGProgrammer commented on September 24, 2024

tf state looks like this after you apply a incorrect domain


    {
      "mode": "managed",
      "type": "namecheap_record",
      "name": "www-adipdx-com",
      "provider": "provider.namecheap",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "address": "1.1.1.xxx",
            "domain": "adipix.com",
            "hostname": "www.adipdx.com",
            "id": "1331301xxx",
            "mx_pref": 10,
            "name": "www",
            "timeouts": null,
            "ttl": 1799,
            "type": "A"
          },
          "depends_on": [
            "xxxxx"
          ]
        }
      ]
    },

I have to change the line "domain": "adipix.com" and fix the domain name manually , otherwise I keep getting hash errors.

from terraform-provider-namecheap.

OGProgrammer avatar OGProgrammer commented on September 24, 2024

These are "low priority" in my opinion but can be really confusing to someone new with terraform/this provider.

from terraform-provider-namecheap.

adamdecaf avatar adamdecaf commented on September 24, 2024

I created namecheap/go-namecheap-sdk#7 and #25 to look at both issues here. I haven't tried them out, but any thoughts?

from terraform-provider-namecheap.

AlexFBP avatar AlexFBP commented on September 24, 2024

I have almost the same Error: Failed to create namecheap Record: Could not find the record with hash but when creating MX records, corrupting my state (Even by commenting MX records/resources, appears that error on terraform plan)

So, I ran terraform show and my 2 MX registers were marked as (tainted), so i had to delete them with

terraform state rm namecheap_record.TAINTED-MX-RECORD

as I have my state backed up in Terraform. In meantime, I left the MX registers commented out.

(My/this comment to this issue, should be in another Issue or here is Ok?)

from terraform-provider-namecheap.

AlexFBP avatar AlexFBP commented on September 24, 2024

Update to my last message: Worked, also as with CNAME registers: There must be a final "." in MX registers.

Is this possible to evaluate if the final period is present in CNAME/MX registers to throw an error in the terraform plan phase?

from terraform-provider-namecheap.

AlexFBP avatar AlexFBP commented on September 24, 2024

Additional complement to my previous comments:

For a recently bought domain, seems that it is needed at first time to set up manually for it in Advanced Settings > Mail Settings: Custom MX and set a valid MX record. Otherwise, no matter what you do and check, you'll get the "Error: Failed to create namecheap Record: Could not find the record with hash"

After that initially/manually created MX record, you can reply its DNS record within Terraform, or, if was created as a "dummy" MX record, you can delete it later, manually and directly from Namecheap web interface

(version used: 1.6.0)

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.