Describe the bug:
The tailscale_dns_configuration resource causes continuous in-place updates during terraform plan when using the dns_override configuration. The backend API appears to return nameserver records in a non-deterministic (shuffled) order. Because the Terraform provider evaluates the returned order against the state file, it constantly flags these ordering changes as drift, causing noisy diffs even when the user hasn't touched the configuration.
To Reproduce:
- Configure a tailscale_dns_configuration resource containing a nameservers block with multiple addresses (e.g.,
1.1.1.1, 1.0.0.3, 1.1.1.3).
- Run
terraform apply to provision the initial configuration.
- Run
terraform plan on subsequent pipeline runs or local executions.
- Observe the Terraform output showing pending in-place updates that simply swap the order of the exact same nameserver IP addresses.
Expected behavior:
The Terraform provider should ideally treat the nameservers block as an unordered set (TypeSet) rather than an ordered list (TypeList) to ignore array shuffling. Alternatively, the backend API should return the nameserver records in a deterministic, consistent order so that Terraform does not interpret the shuffle as configuration drift.
Additional context:
A customer reported this issue via a support ticket. They provided the following snippet from their GitHub Actions log, illustrating the constant swapping behavior:
Warning: Alpha Resource with tailscale_dns_configuration.dns_override,
The tailscale_dns_configuration resource is currently in alpha and subject to change, proceed with caution.
~ nameservers {
~ address = "1.1.1.1" -> "1.1.1.3"
}
~ nameservers {
~ address = "1.1.1.3" -> "1.0.0.3"
}
~ nameservers {
~ address = "1.0.0.3" -> "1.1.1.1"
}
See also go/tss/89939
Describe the bug:
The
tailscale_dns_configurationresource causes continuous in-place updates duringterraform planwhen using thedns_overrideconfiguration. The backend API appears to return nameserver records in a non-deterministic (shuffled) order. Because the Terraform provider evaluates the returned order against the state file, it constantly flags these ordering changes as drift, causing noisy diffs even when the user hasn't touched the configuration.To Reproduce:
1.1.1.1,1.0.0.3,1.1.1.3).terraform applyto provision the initial configuration.terraform planon subsequent pipeline runs or local executions.Expected behavior:
The Terraform provider should ideally treat the
nameserversblock as an unordered set (TypeSet) rather than an ordered list (TypeList) to ignore array shuffling. Alternatively, the backend API should return the nameserver records in a deterministic, consistent order so that Terraform does not interpret the shuffle as configuration drift.Additional context:
A customer reported this issue via a support ticket. They provided the following snippet from their GitHub Actions log, illustrating the constant swapping behavior:
See also go/tss/89939