Closed garry-t closed 11 months ago
@garry-t Thanks for reaching out. Are you still having issues importing the NS records?
I am able to import NS records that exist for a zone with the following:
resource "dnsimple_zone_record" "ns1" {
zone_name = var.dnsimple_domain
name = ""
value = "ns1.dnsimple.com"
type = "NS"
ttl = 3600
}
$ terraform import dnsimple_zone_record.ns1 terraform-dnsimple-test.com_XXXXXXX
dnsimple_zone_record.ns1: Importing from ID "terraform-dnsimple-test.com_XXXXXXX"...
dnsimple_zone_record.ns1: Import prepared!
Prepared dnsimple_zone_record for import
dnsimple_zone_record.ns1: Refreshing state...
Import successful!
The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.
$ terraform show
# dnsimple_zone_record.ns1:
resource "dnsimple_zone_record" "ns1" {
id = XXXXXXX
priority = 0
ttl = 3600
type = "NS"
value = "ns1.dnsimple.com"
value_normalized = "ns1.dnsimple.com"
zone_id = "terraform-dnsimple-test.com"
zone_name = "terraform-dnsimple-test.com"
}
yes we still have, I think problem that we have for_each = toset(data.aws_route53_zone.lb.name_servers)
unfortunately I didnt find any solution for my configuration. I went through the brutal way just remove DNS entries and recreate from TF. Your case is simple import.
If you want you can close ticket.
Impossible import resource for NS record. I provided only part of DEBUG output. I'm sure that i provided correct ID for import.
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
no
Expected Behavior
NS record imported successfully
Actual Behavior
Steps to Reproduce
terraform import dnsimple_zone_record.aws-ns xx-xxxx.awsdns-xx.org_123456
Important Factoids
Nothing special
References
None