terraform-provider-godaddy icon indicating copy to clipboard operation
terraform-provider-godaddy copied to clipboard

Changing one entry rewrites all other RRs

Open alexs77 opened this issue 4 years ago • 6 comments

I'm managing my domain with terraform and your plugin. In my IaC, I've got something like this:

resource "godaddy_domain_record" "skwar_me" {
    domain    = "skwar.me"

    addresses = []

    record {
        data     = "184.168.131.241"
        name     = "@"
        ttl      = 600
        type     = "A"
    }
    record {
        data     = "184.168.131.241"
        name     = "a"
        type     = "A"
    }
    record {
        data     = "184.168.131.241"
        name     = "godaddy"
        ttl      = 600
        type     = "A"
    }
    # …
}

When I now remove the 2nd record (with name = "a"), a terraform plan would show, that ALL the other RRs of that zone would be 1st removed and 2nd added again, with the exact same values.

If the zone is a bit "bigger" (even with just 20+ RRs), it becomes close to impossible to see, what's actually been changed.

alexs77 avatar Jan 19 '21 10:01 alexs77

I'm experiencing the same issue, but only for one of my zones in the account, the other one works just fine. Anyone have an idea of what might cause this?

ilons avatar Apr 09 '21 05:04 ilons

@jakob-northvolt: Is this fixed in https://github.com/jakob-northvolt/terraform-godaddy/commit/a0e786cf275d34a57565a85bc09b23a932398912? And if so, when can we expect this out in a release?

ilons avatar Apr 09 '21 06:04 ilons

@jakob-northvolt: Is this fixed in jakob-northvolt@a0e786c? And if so, when can we expect this out in a release?

Yes it is actually, I meant to make a PR but I got sidetracked with other stuff. I can create a PR during the day. There is a little caveat though that has to do with Godaddy API limitation of certain records being treated as batch no matter what, I will make a comment here when done, but it does solve this issue to the extent possible with regards to Godaddy API.

jakob-northvolt avatar Apr 09 '21 08:04 jakob-northvolt

Might have some uncommitted stuff still locally so don't rely on the version in the repo just yet. I'll sort it out today at some point.

@jakob-northvolt: Is this fixed in jakob-northvolt@a0e786c? And if so, when can we expect this out in a release?

jakob-northvolt avatar Apr 09 '21 08:04 jakob-northvolt

@jakob-northvolt: Is this fixed in jakob-northvolt@a0e786c? And if so, when can we expect this out in a release?

Yes it is actually, I meant to make a PR but I got sidetracked with other stuff. I can create a PR during the day. There is a little caveat though that has to do with Godaddy API limitation of certain records being treated as batch no matter what, I will make a comment here when done, but it does solve this issue to the extent possible with regards to Godaddy API.

Now that is wonderful news! Lets hope those changes can make it into the provider soon :)

ilons avatar Apr 09 '21 08:04 ilons

See pull request: https://github.com/n3integration/terraform-godaddy/pull/42

jakob-northvolt avatar Apr 09 '21 15:04 jakob-northvolt