Server Certificate
Provides an IAM Server Certificate resource to upload Server Certificates. Certs uploaded to IAM can easily work with other AWS services such as:
AWS Elastic Beanstalk
Elastic Load Balancing
CloudFront
AWS OpsWorks For information about server certificates in IAM, see 2 in AWS Documentation.
Example Usage
Using certs on file:
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.ServerCertificate;
import com.pulumi.aws.iam.ServerCertificateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var testCert = new ServerCertificate("testCert", ServerCertificateArgs.builder()
.certificateBody(Files.readString(Paths.get("self-ca-cert.pem")))
.privateKey(Files.readString(Paths.get("test-key.pem")))
.build());
}
}
Import
IAM Server Certificates can be imported using the name
, e.g.,
$ pulumi import aws:iam/serverCertificate:ServerCertificate certificate example.com-certificate-until-2018
1https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html 2https://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingServerCerts.html
Properties
Date and time in RFC3339 format on which the certificate is set to expire.
The IAM path for the server certificate. If it is not included, it defaults to a slash (/). If this certificate is for use with AWS CloudFront, the path must be in format /cloudfront/your_path_here
. See IAM Identifiers for more details on IAM Paths.
Date and time in RFC3339 format when the server certificate was uploaded.