Data Source: awsIamServerCertificate
Use this data source to lookup information about IAM Server Certificates.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsIamServerCertificateMyDomain =
new aws.dataAwsIamServerCertificate.DataAwsIamServerCertificate(
this,
"my-domain",
{
latest: true,
namePrefix: "my-domain.org",
}
);
new aws.elb.Elb(this, "elb", {
listener: [
{
instancePort: 8000,
instanceProtocol: "https",
lbPort: 443,
lbProtocol: "https",
sslCertificateId: dataAwsIamServerCertificateMyDomain.arn,
},
],
name: "my-domain-elb",
});
Argument Reference
namePrefix
- prefix of cert to filter bypathPrefix
- prefix of path to filter byname
- exact name of the cert to lookuplatest
- sort results by expiration date. returns the certificate with expiration date in furthest in the future.
Attributes Reference
id
is set to the unique id of the IAM Server Certificatearn
is set to the ARN of the IAM Server Certificatepath
is set to the path of the IAM Server CertificateexpirationDate
is set to the expiration date of the IAM Server CertificateuploadDate
is the date when the server certificate was uploadedcertificateBody
is the public key certificate (PEM-encoded). This is useful when configuring back-end instance authentication policy for load balancercertificateChain
is the public key certificate chain (PEM-encoded) if exists, empty otherwise
Import
The terraform import function will read in certificate body, certificate chain (if it exists), id, name, path, and arn. It will not retrieve the private key which is not available through the AWS API.