// *** 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/sshKey:SshKey")]
public partial class SshKey : global::Pulumi.CustomResource
{
///
/// RFC 3339 timestamp of when the key was created.
///
[Output("createdAt")]
public Output CreatedAt { get; private set; } = null!;
///
/// Free-form description.
///
[Output("description")]
public Output Description { get; private set; } = null!;
///
/// RFC 3339 timestamp of when the key was last used, if ever.
///
[Output("lastUsedAt")]
public Output LastUsedAt { get; private set; } = null!;
///
/// Display name of the key pair.
///
[Output("name")]
public Output Name { get; private set; } = null!;
///
/// PEM-encoded private key.
///
[Output("privateKey")]
public Output PrivateKey { get; private set; } = null!;
///
/// OpenSSH-formatted public key.
///
[Output("publicKey")]
public Output PublicKey { get; private set; } = null!;
///
/// Create a SshKey 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 SshKey(string name, SshKeyArgs args, CustomResourceOptions? options = null)
: base("dokploy:index/sshKey:SshKey", name, args ?? new SshKeyArgs(), MakeResourceOptions(options, ""))
{
}
private SshKey(string name, Input id, SshKeyState? state = null, CustomResourceOptions? options = null)
: base("dokploy:index/sshKey:SshKey", name, state, MakeResourceOptions(options, id))
{
}
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
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 SshKey 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 SshKey Get(string name, Input id, SshKeyState? state = null, CustomResourceOptions? options = null)
{
return new SshKey(name, id, state, options);
}
}
public sealed class SshKeyArgs : global::Pulumi.ResourceArgs
{
///
/// Free-form description.
///
[Input("description")]
public Input? Description { get; set; }
///
/// Display name of the key pair.
///
[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);
}
}
///
/// OpenSSH-formatted public key.
///
[Input("publicKey", required: true)]
public Input PublicKey { get; set; } = null!;
public SshKeyArgs()
{
}
public static new SshKeyArgs Empty => new SshKeyArgs();
}
public sealed class SshKeyState : global::Pulumi.ResourceArgs
{
///
/// RFC 3339 timestamp of when the key was created.
///
[Input("createdAt")]
public Input? CreatedAt { get; set; }
///
/// Free-form description.
///
[Input("description")]
public Input? Description { get; set; }
///
/// RFC 3339 timestamp of when the key was last used, if ever.
///
[Input("lastUsedAt")]
public Input? LastUsedAt { get; set; }
///
/// Display name of the key pair.
///
[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);
}
}
///
/// OpenSSH-formatted public key.
///
[Input("publicKey")]
public Input? PublicKey { get; set; }
public SshKeyState()
{
}
public static new SshKeyState Empty => new SshKeyState();
}
}