DEV Community

Atsushi Miyamoto
Atsushi Miyamoto

Posted on

1

Terraform import block to import AWS route53

Write import block

Define import block to import exist route53 resource.

// import.tf
import {
  to = aws_route53_record.example
  id = "{hostedZoneId}_{recordName}_{Type}"
}
Enter fullscreen mode Exit fullscreen mode

Run command

Run tf command to output config to generated_resources.tf

terraform plan -generate-config-out=generated_resources.tf
Enter fullscreen mode Exit fullscreen mode

reference:

Terraform generating-configuration

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay