Support for issuing certificates (aws_acm_certificate
) with a private CA (`aws_acmpca_certificate_authority) from the certificate manager.
Currently there is no option to pass in the arn
of a private CA in order to issue a private certificate instead of a default public one.
I can tackle this myself if I didn't miss something.
resource "aws_acm_certificate" "cert" {
domain_name = "internal.example.com"
certificate_authority_arn = "arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012"
}
https://docs.aws.amazon.com/sdk-for-go/api/service/acm/#RequestCertificateInput
Hi @TFaga Thanks for submitting this feature request.
Its important to note that ACM and ACMPCA are different at the SDK level and use different API endpoints. For implementing this support, we will want to create a completely separate resource to handle these concerns. ๐
Hi @bflad
Thanks for getting back. From my understanding, the certificates found in the acm-pca
endpoint serve a different purpose then the ones mentioned in this issue (aws_acm_certificate
). They are only for issuing certificates you generated locally and sent the CSR to the PCA. AWS never gets the private keys and as such are not managed by AWS at all. You can only revoke them AFAIK.
If however, you want to generate a managed certificates from a PCA that functions the same as the public certificates (i.e. keys managed by AWS and usable in integrated services), you need to issue the certificate with the acm
client and pass in a PCA arn
, which currently you cannot do with terraform.
So to summarize we could do two things:
certificate_authority_arn
property to the aws_acm_certificate
in order to enable issuing private managed certificates from a PCA,acm_acmpca_certificate
) which represents the other type of certificate (unmanaged), which is created with an external CSR.Ah ha! Okay I see what you mean there is a difference between these two:
RequestCertificate
SDK call as you originally referencedIssueCertificate
SDK callIn your case, you are correct that for the first case, we can (and should ๐ ) do this with the existing resource. The second will need to be a separate resource. My apologies for the confusion.
When will this feature get released? Are there any alternative to generate private certificate using the current version of terraform?
Hi is there any news on being able to use aws_acm_certificate to issue private certificates, Can use aws_acmpca_certificate_authority for creating a pca but dont seem to be able to use this through tf at mo?
@bflad Please ensure the 2 PRs for this issue are properly reviewed asap. This functionality has been available in the AWS SDK for over a year now. TF is generally better about staying on top of new features.
Hi folks ๐ Support for issuing private certificates via a new certificate_authority_arn
argument in the aws_acm_certificate
resource has been merged and will release with version 2.23.0 of the Terraform AWS Provider, later this week.
If you're interesting in additional functionality, such as issuing ACM PCA certificates (not through ACM), please file new feature request issues for further triage. Thanks.
This has been released in version 2.23.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!
Most helpful comment
When will this feature get released? Are there any alternative to generate private certificate using the current version of terraform?