Closed logicbomb421 closed 1 year ago
Note that this only matters for apex domains with underscores since the ID of the record is [zone]_[id]
. I was able to import a record like foo._domainkey.example.com CNAME …
just fine via terraform import dnsimple_record.foo_dkim example.com_12345678
.
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
Terraform v0.11.1
Affected Resource(s)
dnsimple_record
Terraform Configuration Files
also via cli:
terraform import dnsimple_record.domain _mydomain.com_1234
Expected Behavior
The record is imported into the terraform state.
Actual Behavior
Received the following:
Steps to Reproduce
dnsimple_record
resource to import intoImportant Factoids
The issue is in the
resourceDNSimpleRecordImport
func on line 191 of/dnsimple/resource_dnsimple_record.go
. The length check after splitting the input domain on_
expects there to be exactly two parts, when there is the possibility for domains with underscores in them (for instance, AWS ACM certificate validation records begin with an underscore).Shown here.