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

FreeDNS subdomain records are all incorrectly going to the root domain #71

Open
tranvansang opened this issue Jan 19, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@tranvansang
Copy link

tranvansang commented Jan 19, 2023

Terraform Version

Terraform v1.3.3
on linux_amd64

Namecheap provider version

+ provider registry.terraform.io/namecheap/namecheap v2.1.0

Affected Resource(s)

  • namecheap_domain_records

Terraform Configuration Files

resource "namecheap_domain_records" "sub" {
	domain     = "sub.example.com"
	email_type = "MX"
	mode       = "MERGE"

	record {
		hostname = "@"
		type     = "A"
		address  = "1.2.3.4"
	}

	record {
		hostname = "mail"
		type     = "MX"
		address  = "mx.sub.example.com."
		mx_pref  = 10
	}

	record {
		hostname = "mx"
		type     = "A"
		address  = "1.2.3.4"
	}
}

resource "namecheap_domain_records" "main" {
	domain     = "example.com"
	mode       = "MERGE"
	email_type = "FWD"
	record {
		hostname = "sub"
		type     = "NS"
		address  = "freedns1.registrar-servers.com."
	}
	record {
		hostname = "sub"
		type     = "NS"
		address  = "freedns2.registrar-servers.com."
	}
	record {
		hostname = "sub"
		type     = "NS"
		address  = "freedns3.registrar-servers.com."
	}
	record {
		hostname = "sub"
		type     = "NS"
		address  = "freedns4.registrar-servers.com."
	}
	record {
		hostname = "sub"
		type     = "NS"
		address  = "freedns5.registrar-servers.com."
	}
}

Debug Output

Panic Output

Expected Behavior

The records for subdomain sub.example.com, including mail setting, are configured to the associated FreeDNS domain sub.example.com.
In case that two configs are conflicting, separating the two records in 2 projects and try apply the project with main record first, then apply the project with sub record.

Actual Behavior

The records for subdomain sub.example.com are configured to the root domain example.com.

Steps to Reproduce

  1. terraform apply

Important Factoids

I own the root domain example.com and manage it on namecheap.
I also create a FreeDNS domain to manage sub.example.com.

Rationale: I want to customize MX on the subdomain while using email forwarding on the root domain.

References

@ensosystems
Copy link

I'm currently experiencing the same behavior.

I reached out to the support team just to make sure there are no workarounds. It seems there are no workarounds for this.

@vetal2409 vetal2409 self-assigned this Feb 9, 2024
@vetal2409 vetal2409 added the bug Something isn't working label Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants