Closed paddycarver closed 6 months ago
Thank you for taking the time to report this @paddycarver. I agree adding a validation to the resource can be a good first step. We will work on this in the coming weeks.
For those doing this that want the answer without provider changes, if you change your config to this:
resource "dnsimple_domain" "my_domain" {
name = "dnsimple.com"
}
resource "google_dns_managed_zone" "my_domain" {
name = "my-domain"
dns_name = "dnsimple.com."
}
resource "dnsimple_domain_delegation" "my_domain" {
domain = dnsimple_domain.my_domain.name
name_servers = [for s in google_dns_managed_zone.my_domain.name_servers : trimsuffix(s, ".")]
}
it works.
@DXTimer please provide an update as planned.
Terraform Version
v1.5.4
Affected Resource(s)
Terraform Configuration Files
Debug Output
Available upon request, but shouldn't be necessary.
Expected Behavior
After first apply, no changes show up in plan.
Actual Behavior
Steps to Reproduce
terraform apply
terraform apply
Other
I'm happy to open a PR to address this issue, if it would help. I believe the plan just needs to be modified to treat the name server list values as equal if they match except for a trailing
.
. The alternative is for the API to return the values as they're provided, or for the API (or provider) to reject nameservers that end in.
as invalid, if it's going to canonicalize them anyways.