Closed lawrencewilson closed 1 year ago
Thank you @lawrencewilson for the detailed steps on reproducing the issue. We will work on a fix in the coming days.
Happy to share that we've been able to address the issue and a fix has been released as part of 0.16.2. #84
In case there are further comments, questions, or new discoveries please feel free to comment on the issue and we will re-open it.
Terraform Version
Affected Resource(s)
Terraform Configuration Files
main.tf
domain1.com.json
Debug Output
https://gist.github.com/lawrencewilson/c74945564685cb46241718a2db56a5b9
Panic Output
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the
crash.log
.Expected Behavior
What should have happened?
When you enable
prefetch
without changing the state, we should seeNo changes
in terraform.Actual Behavior
When you enable
prefetch
without changing the state, terraform detects drift where there is none and will attempt to delete and re-create records.Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
... redacted to save space ...
dnsimple_zone_record.domain1_com["bWFpbC5leGFtcGxlLmNvbS1NWC0xbXg="]: Refreshing state... [id=2940594] dnsimple_zone_record.domain1_com["aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20tVVJMLQ=="]: Refreshing state... [id=2940578]
No changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.
PS > $Env:TF_VAR_DNSIMPLE_PREFETCH="true" PS > terraform init
Initializing the backend...
Initializing provider plugins...
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see any changes that are required for your infrastructure. All Terraform commands should now work.
If you ever set or change modules or backend configuration for Terraform, rerun this command to reinitialize your working directory. If you forget, other commands will detect it and remind you to do so if necessary.
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: ~ update in-place -/+ destroy and then create replacement
Terraform will perform the following actions:
dnsimple_zone_record.domain1_com["MS4xLjEuMS1BLQ=="] must be replaced
-/+ resource "dnsimple_zone_record" "domain1_com" { ~ id = "2940587" -> (known after apply) ~ priority = "0" -> (known after apply) ~ qualified_name = "domain1.com" -> (known after apply) ~ ttl = "3600" -> "600" ~ type = "SOA" -> "A" # forces replacement ~ value = "ns1.dnsimple.com admin.dnsimple.com 1677551382 86400 7200 604800 300" -> "1.1.1.1" ~ zone_id = "domain1.com" -> (known after apply)
(1 unchanged attribute hidden)
dnsimple_zone_record.domain1_com["aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20tVVJMLQ=="] must be replaced
-/+ resource "dnsimple_zone_record" "domain1_com" { ~ id = "2940578" -> (known after apply) ~ priority = "0" -> (known after apply) ~ qualified_name = "domain1.com" -> (known after apply) ~ ttl = "3600" -> "600" ~ type = "SOA" -> "URL" # forces replacement ~ value = "ns1.dnsimple.com admin.dnsimple.com 1677551382 86400 7200 604800 300" -> "https://www.example.com" ~ zone_id = "domain1.com" -> (known after apply)
(1 unchanged attribute hidden)
dnsimple_zone_record.domain1_com["bWFpbC5leGFtcGxlLmNvbS1NWC0="] must be replaced
-/+ resource "dnsimple_zone_record" "domain1_com" { ~ id = "2940580" -> (known after apply) ~ priority = "0" -> "11" ~ qualified_name = "domain1.com" -> (known after apply) ~ type = "SOA" -> "MX" # forces replacement ~ value = "ns1.dnsimple.com admin.dnsimple.com 1677551382 86400 7200 604800 300" -> "mail.example.com" ~ zone_id = "domain1.com" -> (known after apply)
(2 unchanged attributes hidden)
dnsimple_zone_record.domain1_com["bWFpbDIxLmV4YW1wbGUuY29tLU1YLTJteA=="] will be updated in-place
~ resource "dnsimple_zone_record" "domain1_com" { id = "2940600" name = "2mx" ~ priority = "5" -> "1" ~ value = "mail25.example.com" -> "mail21.example.com"
(5 unchanged attributes hidden)
dnsimple_zone_record.domain1_com["bnMtMS5leGFtcGxlLmNvbS1OUy1leGFtcGxl"] will be updated in-place
~ resource "dnsimple_zone_record" "domain1_com" { id = "2940591" name = "example" ~ value = "ns-3.example.com" -> "ns-1.example.com"
(6 unchanged attributes hidden)
dnsimple_zone_record.domain1_com["bnMtMi5leGFtcGxlLmNvbS1OUy1leGFtcGxl"] will be updated in-place
~ resource "dnsimple_zone_record" "domain1_com" { id = "2940584" name = "example" ~ value = "ns-3.example.com" -> "ns-2.example.com"
(6 unchanged attributes hidden)
dnsimple_zone_record.domain1_com["bnMtNC5leGFtcGxlLmNvbS1OUy1leGFtcGxl"] will be updated in-place
~ resource "dnsimple_zone_record" "domain1_com" { id = "2940582" name = "example" ~ value = "ns-3.example.com" -> "ns-4.example.com"
(6 unchanged attributes hidden)
Plan: 3 to add, 4 to change, 3 to destroy.