ServerCertificateArgs

data class ServerCertificateArgs(val certificateBody: Output<String>? = null, val certificateChain: Output<String>? = null, val name: Output<String>? = null, val namePrefix: Output<String>? = null, val path: Output<String>? = null, val privateKey: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<ServerCertificateArgs>

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

Constructors

Link copied to clipboard
constructor(certificateBody: Output<String>? = null, certificateChain: Output<String>? = null, name: Output<String>? = null, namePrefix: Output<String>? = null, path: Output<String>? = null, privateKey: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val certificateBody: Output<String>? = null

The contents of the public key certificate in PEM-encoded format.

Link copied to clipboard
val certificateChain: Output<String>? = null

The contents of the certificate chain. This is typically a concatenation of the PEM-encoded public key certificates of the chain.

Link copied to clipboard
val name: Output<String>? = null

The name of the Server Certificate. Do not include the path in this value. If omitted, the provider will assign a random, unique name.

Link copied to clipboard
val namePrefix: Output<String>? = null

Creates a unique name beginning with the specified prefix. Conflicts with name.

Link copied to clipboard
val path: Output<String>? = null

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.

Link copied to clipboard
val privateKey: Output<String>? = null

The contents of the private key in PEM-encoded format.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Map of resource tags for the server certificate. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

Link copied to clipboard
open override fun toJava(): ServerCertificateArgs