Constellix / terraform-provider-constellix

Terraform Constellix provider
https://www.terraform.io/docs/providers/constellix/
Mozilla Public License 2.0
7 stars 20 forks source link

Phantom TXT record blocking provider version update #54

Open billmcmath-insider opened 11 months ago

billmcmath-insider commented 11 months ago

We are trying to update our version of the Constellix provider from version 0.3.11 to 0.4.5. This is the only change we have in the PR, however a phantom change in a TXT record is being picked up and stopping merging of the change.

The TXT record with the phantom change is on the root domain, where we have 1 record with 15 roundrobin values in it. The change that Terraform is seeing is that the individual values are being reordered in the list, e.g.

~ resource "constellix_txt_record" "root_TXT" {
        id          = "12345678"
        # (8 unchanged attributes hidden)

      ~ roundrobin {
          ~ value        = "apple-domain-verification=a-value" -> "google-site-verification=gsv-value-1"
            # (1 unchanged attribute hidden)
        }
      ~ roundrobin {
          ~ value        = "facebook-domain-verification=fb-value" -> "google-site-verification=gsv-value-2"
            # (1 unchanged attribute hidden)
        }
      ~ roundrobin {
      ...
      etc.

This wouldn't be much of an issue except that it's stopping the Terraform code from being deployed.

Error: Contents are identical

  with constellix_txt_record.root_TXT,
  on constellix.tf line 718, in resource "constellix_txt_record" "root_TXT":
 718: resource "constellix_txt_record" "root_TXT" {

We have attempted to resolve this by deleting the resource from the state and importing it again, but the same behaviour was seen.

mivalsten commented 4 months ago

This is actually an issue with 0.4.5 importing resources wrong. A workaround for that is to change TTL of a record and then change it back to correct value.