title: Terraform + Route53 - manage existing record
body: <p>I have a production environment that is configured to have a domain name that points to a load-balancer. This is already working, and it was configured using Route53.</p>
  
  <p>I am using Terraform to deploy the infrastructure, including the Route53 record. </p>
  
  <p>The Route53 record was set <strong>manually</strong>.</p>
  
  <p>I would like for Terraform to manage the Route53 record in subsequent deployments. However, when I run an update to update the infrastructure and include the Route53 record, I get this error:</p>
  
  <pre><code>Error: Error applying plan:
  
  1 error(s) occurred:
  
   * module.asg.aws_route53_record.www: 1 error(s) occurred:
  
   * aws_route53_record.www: [ERR]: Error building changeset: 
      InvalidChangeBatch: [Tried to create a resource record set
      [name='foo.com.', type='A'] but it already exists]
  </code></pre>
  
  <p>Well, at first, this error makes sense, because the resource already exists. But, given this, <strong>how can I overcome this issue without causing downtime?</strong> </p>
  
  <p>I've tried to manually edit the state file to include the route53 record, but that failed with the same error...</p>
  
  <p>I'm happy to provide more information if necessary. Any suggestions that you might have are welcome. Thank you.</p>