title: Terraform, AWS and importing existing SSL certificates
body: <p>I'm working in a project where I have gotten a situation which I can't get the path to succeed.</p>
  <p>Truth is I'm running terraform code through a pipeline, this code depends on a bunch of certificates that have been added through AWS web console, so I have the certificate, the private key and the certificate chain files.</p>
  <p>(I delete them and tried to import through terraform)</p>
  <p>Googling a bit I got these:</p>
  <pre><code>resource &quot;aws_acm_certificate&quot; &quot;tch-cert&quot; {
    private_key=file(&quot;private.key&quot;)
    certificate_body = file(&quot;actual_cert.cer&quot;)
    certificate_chain=file(&quot;inter.cer&quot;)
    }
  </code></pre>
  <p><a href="https://stackoverflow.com/questions/63133012/upload-ssl-certs-using-terraform">Upload ssl certs using terraform</a></p>
  <p>I added the code, commit it and got error like the following in the terraform plan command</p>
  <blockquote>
  <p>&quot;error parsing ... 2:15 Unknown token: IDENT File&quot; &quot;error parsing ... 2:17 Unknown token: IDENT File&quot;</p>
  </blockquote>
  <p>Any advice or example how these should be done would be really appreciate it. I read the terraform doc also but it's not working for me.</p>
  <p><a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/acm_certificate" rel="nofollow noreferrer">https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/acm_certificate</a></p>