UNPKG

@muhlba91/pulumi-proxmoxve

Version:

A Pulumi package for creating and managing Proxmox Virtual Environment cloud resources.

180 lines 7.36 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.CertificateLegacy = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * > **Deprecated:** Use `proxmoxve.acme.Certificate` instead. This resource will be removed in v1.0. * * Manages ACME SSL certificates for Proxmox VE nodes. * * This resource orders and renews certificates from an ACME Certificate Authority (like Let's Encrypt) for a specific node. Before using this resource, ensure that: * - An ACME account is configured (using `proxmoxve.acme.Account`) * - DNS plugins are configured if using DNS-01 challenge (using `proxmoxve.acme/dns.Plugin`) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as proxmoxve from "@muhlba91/pulumi-proxmoxve"; * * // Example: Basic ACME certificate with HTTP-01 challenge (standalone) * const example = new proxmoxve.acme.AccountLegacy("example", { * name: "production", * contact: "admin@example.com", * directory: "https://acme-v02.api.letsencrypt.org/directory", * tos: "https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf", * }); * const httpExample = new proxmoxve.acme.CertificateLegacy("http_example", { * nodeName: "pve-node-01", * account: example.name, * domains: [{ * domain: "pve.example.com", * }], * }); * // Example: ACME certificate with DNS-01 challenge using Cloudflare * const cloudflare = new proxmoxve.acme.dns.PluginLegacy("cloudflare", { * plugin: "cloudflare", * api: "cf", * validationDelay: 120, * data: { * CF_Account_ID: "your-cloudflare-account-id", * CF_Token: "your-cloudflare-api-token", * CF_Zone_ID: "your-cloudflare-zone-id", * }, * }); * const dnsExample = new proxmoxve.acme.CertificateLegacy("dns_example", { * nodeName: "pve-node-01", * account: example.name, * domains: [{ * domain: "pve.example.com", * plugin: cloudflare.plugin, * }], * }, { * dependsOn: [ * example, * cloudflare, * ], * }); * // Example: Force certificate renewal * const forceRenew = new proxmoxve.acme.CertificateLegacy("force_renew", { * nodeName: "pve-node-01", * account: example.name, * force: true, * domains: [{ * domain: "pve.example.com", * plugin: cloudflare.plugin, * }], * }, { * dependsOn: [ * example, * cloudflare, * ], * }); * ``` * * ## Import * * !/usr/bin/env sh * ACME certificates can be imported using the node name, e.g.: * * ```sh * $ pulumi import proxmoxve:acme/certificateLegacy:CertificateLegacy example pve-node-01 * ``` */ class CertificateLegacy extends pulumi.CustomResource { /** * Get an existing CertificateLegacy 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 CertificateLegacy(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'proxmoxve:acme/certificateLegacy:CertificateLegacy'; /** * Returns true if the given object is an instance of CertificateLegacy. 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'] === CertificateLegacy.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["account"] = state?.account; resourceInputs["certificate"] = state?.certificate; resourceInputs["domains"] = state?.domains; resourceInputs["fingerprint"] = state?.fingerprint; resourceInputs["force"] = state?.force; resourceInputs["issuer"] = state?.issuer; resourceInputs["nodeName"] = state?.nodeName; resourceInputs["notAfter"] = state?.notAfter; resourceInputs["notBefore"] = state?.notBefore; resourceInputs["subject"] = state?.subject; resourceInputs["subjectAlternativeNames"] = state?.subjectAlternativeNames; } else { const args = argsOrState; if (args?.account === undefined && !opts.urn) { throw new Error("Missing required property 'account'"); } if (args?.domains === undefined && !opts.urn) { throw new Error("Missing required property 'domains'"); } if (args?.nodeName === undefined && !opts.urn) { throw new Error("Missing required property 'nodeName'"); } resourceInputs["account"] = args?.account; resourceInputs["domains"] = args?.domains; resourceInputs["force"] = args?.force; resourceInputs["nodeName"] = args?.nodeName; resourceInputs["certificate"] = undefined /*out*/; resourceInputs["fingerprint"] = undefined /*out*/; resourceInputs["issuer"] = undefined /*out*/; resourceInputs["notAfter"] = undefined /*out*/; resourceInputs["notBefore"] = undefined /*out*/; resourceInputs["subject"] = undefined /*out*/; resourceInputs["subjectAlternativeNames"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(CertificateLegacy.__pulumiType, name, resourceInputs, opts); } } exports.CertificateLegacy = CertificateLegacy; //# sourceMappingURL=certificateLegacy.js.map