I'm terraforming an infrastructure that was never in Terraform before. I have like 300 Route53 records. I used terraform import
command to import into state until I realised it's not wise to do for each records because there are a lot of them.
I tried a tool called terraforming
but looks like the state isn't getting updated well. After import, when I do terraform plan
, I see a lot of stuff that will be created. This is wrong.
I have blocks like:
resource "aws_route53_record" "examplerecord" {
zone_id = "zone_id"
name = "name"
type = "NS"
records = [""]
resource "aws_route53_zone" "examplezone" {
name = "name"
comment = "comment"
tags {
}
}
How can I achieve achieve importing all the records at once into Terraform state? Any ideas? Thanks.