使用 terraform 上传 ssl 证书

Upload ssl certs using terraform

我有现有的 ssl 证书、私钥和中间证书(使用 openssl 获得)。不是通过aws。我现在想使用 terraform 上传它们。我发现 https://github.com/terraform-providers/terraform-provider-aws/issues/3560 您可以上传现有证书。但无法找到有关如何执行此操作的示例。

我找到了问题的答案。文档对于如何传递参数不是很清楚。

resource "aws_acm_certificate" "tch-cert" {
  private_key=file("private.key")
 certificate_body = file("actual_cert.cer")
  certificate_chain=file("inter.cer")
    }