terraform-provider-dnsimple
terraform-provider-dnsimple copied to clipboard
Import fails with error "nil entry in ImportState results"
When attempting to import some DNSimple records into Terraform:
terraform import "dnsimple_record.test-ns1" "example.com_123456789"
Fails with the error:
Error: nil entry in ImportState results. This is always a bug with
the resource that is being imported. Please report this as
a bug to Terraform.
Terraform Version
Terraform v0.12.29
+ provider.dnsimple v0.4.0
+ provider.external v1.2.0
Affected Resource(s)
- dnsimple_record
Terraform Configuration Files
data "external" "dnsimple_credentials" {
program = ["/bin/bash", "-c", "jq -c -r . /Users/XXXX/.config/dnsimple/XXXXXXX.json"]
}
provider "dnsimple" {
token = data.external.dnsimple_credentials.result["token"]
account = data.external.dnsimple_credentials.result["account"]
}
resource "dnsimple_record" "test-ns1" {
domain = "example.com"
name = "test"
value = "ns1.example-dns-provider.com"
type = "NS"
ttl = 3600
}
Debug Output
https://gist.github.com/aryounce/e7ca7ef412ee05d0ddef9a890a7b3cf2
Expected Behavior
The resource should be imported into the Terraform state.
Actual Behavior
Failure with error message provided above.
Steps to Reproduce
-
terraform import "dnsimple_record.test-ns1" "example.com_123456789"
Hi I'm still getting this issue. Has a fix already been implemented? Same steps, same output.
Terraform v1.0.11
on linux_amd64
+ provider registry.terraform.io/dnsimple/dnsimple v0.11.0
Can you confirm as to whether the record you were trying to import did exist?
2020-07-24T17:08:38.409-0500 [DEBUG] plugin.terraform-provider-dnsimple_v0.4.0_x4: 2020/07/24 17:08:38 DNSimple Record Not Found - Refreshing from State
This has now been fixed in v0.16.3.