Write import block
Define import block to import exist route53 resource.
// import.tf
import {
to = aws_route53_record.example
id = "{hostedZoneId}_{recordName}_{Type}"
}
Run command
Run tf command to output config to generated_resources.tf
terraform plan -generate-config-out=generated_resources.tf
reference:
Top comments (0)