n3integration/terraform-provider-godaddy

Changing one entry rewrites all other RRs

alexs77 opened this issue · 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.

ilons commented

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 commented

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

@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.

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?

ilons commented

@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 :)

See pull request:
#42