// *** WARNING: this file was generated by pulumi-language-dotnet. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; using Pulumi; namespace Maxvojtkov.Dokploy { [DokployResourceType("dokploy:index/certificate:Certificate")] public partial class Certificate : global::Pulumi.CustomResource { /// /// Whether Dokploy should renew this certificate automatically. /// [Output("autoRenew")] public Output AutoRenew { get; private set; } = null!; /// /// PEM-encoded certificate chain. /// [Output("certificateData")] public Output CertificateData { get; private set; } = null!; /// /// Path where Dokploy writes the certificate on disk. /// [Output("certificatePath")] public Output CertificatePath { get; private set; } = null!; /// /// Display name of the certificate. /// [Output("name")] public Output Name { get; private set; } = null!; /// /// PEM-encoded private key. /// [Output("privateKey")] public Output PrivateKey { get; private set; } = null!; /// /// Server this certificate is installed on. /// [Output("serverId")] public Output ServerId { get; private set; } = null!; /// /// Create a Certificate resource with the given unique name, arguments, and options. /// /// /// The unique name of the resource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Certificate(string name, CertificateArgs args, CustomResourceOptions? options = null) : base("dokploy:index/certificate:Certificate", name, args ?? new CertificateArgs(), MakeResourceOptions(options, "")) { } private Certificate(string name, Input id, CertificateState? state = null, CustomResourceOptions? options = null) : base("dokploy:index/certificate:Certificate", name, state, MakeResourceOptions(options, id)) { } private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) { var defaultOptions = new CustomResourceOptions { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy", AdditionalSecretOutputs = { "privateKey", }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. merged.Id = id ?? merged.Id; return merged; } /// /// Get an existing Certificate resource's state with the given name, ID, and optional extra /// properties used to qualify the lookup. /// /// /// The unique name of the resulting resource. /// The unique provider ID of the resource to lookup. /// Any extra arguments used during the lookup. /// A bag of options that control this resource's behavior public static Certificate Get(string name, Input id, CertificateState? state = null, CustomResourceOptions? options = null) { return new Certificate(name, id, state, options); } } public sealed class CertificateArgs : global::Pulumi.ResourceArgs { /// /// Whether Dokploy should renew this certificate automatically. /// [Input("autoRenew")] public Input? AutoRenew { get; set; } /// /// PEM-encoded certificate chain. /// [Input("certificateData", required: true)] public Input CertificateData { get; set; } = null!; /// /// Display name of the certificate. /// [Input("name")] public Input? Name { get; set; } [Input("privateKey", required: true)] private Input? _privateKey; /// /// PEM-encoded private key. /// public Input? PrivateKey { get => _privateKey; set { var emptySecret = Output.CreateSecret(0); _privateKey = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1); } } /// /// Server this certificate is installed on. /// [Input("serverId")] public Input? ServerId { get; set; } public CertificateArgs() { } public static new CertificateArgs Empty => new CertificateArgs(); } public sealed class CertificateState : global::Pulumi.ResourceArgs { /// /// Whether Dokploy should renew this certificate automatically. /// [Input("autoRenew")] public Input? AutoRenew { get; set; } /// /// PEM-encoded certificate chain. /// [Input("certificateData")] public Input? CertificateData { get; set; } /// /// Path where Dokploy writes the certificate on disk. /// [Input("certificatePath")] public Input? CertificatePath { get; set; } /// /// Display name of the certificate. /// [Input("name")] public Input? Name { get; set; } [Input("privateKey")] private Input? _privateKey; /// /// PEM-encoded private key. /// public Input? PrivateKey { get => _privateKey; set { var emptySecret = Output.CreateSecret(0); _privateKey = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1); } } /// /// Server this certificate is installed on. /// [Input("serverId")] public Input? ServerId { get; set; } public CertificateState() { } public static new CertificateState Empty => new CertificateState(); } }