I think this happened because the TTL field is marked as ForceNew, that will then fail. Personally, I think this was caused by the TTL field not being read in this block:
I didn't give my API token on Gandi the permission to delete/recreate domains, so I can't say whether this would be a one-off or if it would try to recreate the domain on all plans.
Here's my rationale:
TTL is a required argument for the LiveDNS domain, so I specified some value:
I ran terraform import gandi_livedns_domain.example_net example.net successfully, and here's a state show:
# gandi_livedns_domain.example_net:
resource "gandi_livedns_domain" "example_net" {
automatic_snapshots = true
id = "example.net"
name = "example.net"
timeouts {}
}
Note how the ttl value is being "added" when I run terraform plan:
Terraform will perform the following actions:
# gandi_livedns_domain.example_net must be replaced
-/+ resource "gandi_livedns_domain" "example_net" {
- automatic_snapshots = true -> null
~ id = "example.net" -> (known after apply)
name = "example.net"
+ ttl = 300 # forces replacement
- timeouts {}
}
I've started playing around with Terraform 3 days ago, so I'm not familiar enough with TF to be able to speak confidently that this is the source of the bug.
I think this happened because the TTL field is marked as ForceNew, that will then fail. Personally, I think this was caused by the TTL field not being read in this block:
https://github.com/go-gandi/terraform-provider-gandi/blob/master/gandi/resource_livedns_domain.go#L62-L73
I didn't give my API token on Gandi the permission to delete/recreate domains, so I can't say whether this would be a one-off or if it would try to recreate the domain on all plans.
Here's my rationale:
terraform import gandi_livedns_domain.example_net example.net
successfully, and here's astate show
:ttl
value is being "added" when I runterraform plan
:I've started playing around with Terraform 3 days ago, so I'm not familiar enough with TF to be able to speak confidently that this is the source of the bug.
Thanks in advance,