Skip to content

adding mailserver with namecheap domain not working #48

Open
@tecknicaltom

Description

Attempting to add a mailserver to an existing operation using a namecheap domain is failing with an error.

command:

python3 terry.py --operation [redacted] --verbose --no_elastic add   server --provider aws --type mailserver --fqdn [redacted].com:namecheap

generates the following plan for dns resources:

  # namecheap_domain_records._dmarc-mx-TXT-id-6f170dfd-ba29-4af1-90f8-2308125247fa will be created
  + resource "namecheap_domain_records" "_dmarc-mx-TXT-id-6f170dfd-ba29-4af1-90f8-2308125247fa" {
      + domain     = "[redacted].com"
      + email_type = "NONE"
      + id         = (known after apply)
      + mode       = "MERGE"

      + record {
          + address  = "v=DMARC1; p=none"
          + hostname = "_dmarc.mx"
          + mx_pref  = 10
          + ttl      = 1799
          + type     = "TXT"
        }
    }

  # namecheap_domain_records.mx-A-id-6f170dfd-ba29-4af1-90f8-2308125247fa will be created
  + resource "namecheap_domain_records" "mx-A-id-6f170dfd-ba29-4af1-90f8-2308125247fa" {
      + domain     = "[redacted].com"
      + email_type = "NONE"
      + id         = (known after apply)
      + mode       = "MERGE"

      + record {
          + address  = (known after apply)
          + hostname = "mx"
          + mx_pref  = 10
          + ttl      = 1799
          + type     = "A"
        }
    }

  # namecheap_domain_records.mx-MX-id-6f170dfd-ba29-4af1-90f8-2308125247fa will be created
  + resource "namecheap_domain_records" "mx-MX-id-6f170dfd-ba29-4af1-90f8-2308125247fa" {
      + domain     = "[redacted].com"
      + email_type = "MX"
      + id         = (known after apply)
      + mode       = "MERGE"

      + record {
          + address  = "mx.[redacted].com."
          + hostname = "mx"
          + mx_pref  = 10
          + ttl      = 1799
          + type     = "MX"
        }
    }

After accepting the actions, it appears that the MX record is properly created, but the other two records fail, with errors such as:

Error: Records[1].RecordType MX is not allowed for EmailType=NONE

  with namecheap_domain_records.mx-A-id-6f170dfd-ba29-4af1-90f8-2308125247fa,
  on [redacted]_plan.tf line 176, in resource "namecheap_domain_records" "mx-A-id-6f170dfd-ba29-4af1-90f8-2308125247fa":
 176: resource "namecheap_domain_records" "mx-A-id-6f170dfd-ba29-4af1-90f8-2308125247fa" { 

[X] Fatal Error: Terraform returned an error: No stderr was returned, this is likely a logic issue or partial error within the plan. (Example: if AWS, a bad AMI given the region)

This is with the current github version of Terry, commit dcf6861

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions