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

Changing domain ID do not transfer record to new domain ID #27

Open
sanarena opened this issue Dec 14, 2020 · 2 comments
Open

Changing domain ID do not transfer record to new domain ID #27

sanarena opened this issue Dec 14, 2020 · 2 comments

Comments

@sanarena
Copy link

Terraform Version

terraform v0.14.2

Affected Resource(s)

dme_dns_record

Terraform Configuration Files

resource "dme_dns_record" "record" {
  domain_id     = "74230"
  name          = "test-record"
  type          = "CNAME"
  ttl           = "3600"
  value         = "www.example.org."
}

Debug Output

from terraform plan:

  ~ resource "dme_dns_record" "record" {
      ~ domain_id       = "7321" -> "74230"
        id              = (sensitive)
        name            = "test-record"
      ~ value           = (sensitive)
        # (16 unchanged attributes hidden)
    }

Expected Behavior

What should have happened?
It should delete record from previous domain and create it in new domain

Actual Behavior

What actually happened?
It update value, but kept record in old domain.

Steps to Reproduce

  1. create a record in domain A via dme_dns_record
  2. change dme_dns_record domain_id to domain B
  3. you can see record did not come to domain B and it is still in domain A

My Temporarily work-around

Comment dme_dns_record blocks so that it delete them in DNS Made Easy panel.
Uncomment so that it recreate them again in correct domain ID.

@sanarena
Copy link
Author

sanarena commented Dec 14, 2020

I would like to add that previous issue lead to an invalid terraform state file.
Probably in state, it now know record belong to domain B where it actually reside in domain A, therefor i cannot do anything with it now.
Terraform apply is failing with:
Error: invalid character '<' looking for beginning of value
resorting to state file surgery now.

Update:
due to invalid domain id assigned to the record, it look like terraform could not fetch dme_dns_record resource details to put into state file. so all values of dme_dns_record in state file were null except domain_id.
To recover from this corrupted state file, I had to revert back to previous state file (where domain_id, id, name, value, ... were still visible in state file). Luckily I was using terraform cloud so it archive a copy of state file for each run.

@rdb
Copy link

rdb commented Mar 22, 2022

Any chance that this might get fixed? It is currently making use of this plug-in extremely painful.

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

No branches or pull requests

2 participants