@pulumi/tls
Version:
A Pulumi package to create TLS resources in Pulumi programs.
90 lines • 5.3 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelfSignedCert = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
class SelfSignedCert extends pulumi.CustomResource {
/**
* Get an existing SelfSignedCert resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new SelfSignedCert(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SelfSignedCert. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === SelfSignedCert.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["allowedUses"] = state ? state.allowedUses : undefined;
resourceInputs["certPem"] = state ? state.certPem : undefined;
resourceInputs["dnsNames"] = state ? state.dnsNames : undefined;
resourceInputs["earlyRenewalHours"] = state ? state.earlyRenewalHours : undefined;
resourceInputs["ipAddresses"] = state ? state.ipAddresses : undefined;
resourceInputs["isCaCertificate"] = state ? state.isCaCertificate : undefined;
resourceInputs["keyAlgorithm"] = state ? state.keyAlgorithm : undefined;
resourceInputs["privateKeyPem"] = state ? state.privateKeyPem : undefined;
resourceInputs["readyForRenewal"] = state ? state.readyForRenewal : undefined;
resourceInputs["setAuthorityKeyId"] = state ? state.setAuthorityKeyId : undefined;
resourceInputs["setSubjectKeyId"] = state ? state.setSubjectKeyId : undefined;
resourceInputs["subject"] = state ? state.subject : undefined;
resourceInputs["uris"] = state ? state.uris : undefined;
resourceInputs["validityEndTime"] = state ? state.validityEndTime : undefined;
resourceInputs["validityPeriodHours"] = state ? state.validityPeriodHours : undefined;
resourceInputs["validityStartTime"] = state ? state.validityStartTime : undefined;
}
else {
const args = argsOrState;
if ((!args || args.allowedUses === undefined) && !opts.urn) {
throw new Error("Missing required property 'allowedUses'");
}
if ((!args || args.privateKeyPem === undefined) && !opts.urn) {
throw new Error("Missing required property 'privateKeyPem'");
}
if ((!args || args.validityPeriodHours === undefined) && !opts.urn) {
throw new Error("Missing required property 'validityPeriodHours'");
}
resourceInputs["allowedUses"] = args ? args.allowedUses : undefined;
resourceInputs["dnsNames"] = args ? args.dnsNames : undefined;
resourceInputs["earlyRenewalHours"] = args ? args.earlyRenewalHours : undefined;
resourceInputs["ipAddresses"] = args ? args.ipAddresses : undefined;
resourceInputs["isCaCertificate"] = args ? args.isCaCertificate : undefined;
resourceInputs["privateKeyPem"] = (args === null || args === void 0 ? void 0 : args.privateKeyPem) ? pulumi.secret(args.privateKeyPem) : undefined;
resourceInputs["setAuthorityKeyId"] = args ? args.setAuthorityKeyId : undefined;
resourceInputs["setSubjectKeyId"] = args ? args.setSubjectKeyId : undefined;
resourceInputs["subject"] = args ? args.subject : undefined;
resourceInputs["uris"] = args ? args.uris : undefined;
resourceInputs["validityPeriodHours"] = args ? args.validityPeriodHours : undefined;
resourceInputs["certPem"] = undefined /*out*/;
resourceInputs["keyAlgorithm"] = undefined /*out*/;
resourceInputs["readyForRenewal"] = undefined /*out*/;
resourceInputs["validityEndTime"] = undefined /*out*/;
resourceInputs["validityStartTime"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["privateKeyPem"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(SelfSignedCert.__pulumiType, name, resourceInputs, opts);
}
}
exports.SelfSignedCert = SelfSignedCert;
/** @internal */
SelfSignedCert.__pulumiType = 'tls:index/selfSignedCert:SelfSignedCert';
//# sourceMappingURL=selfSignedCert.js.map