// *** 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
{
///
/// The provider type for the dokploy package. By default, resources use package-wide configuration
/// settings, however an explicit `Provider` instance may be created and passed during resource
/// construction to achieve fine-grained programmatic control over provider settings. See the
/// [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
///
[DokployResourceType("pulumi:providers:dokploy")]
public partial class Provider : global::Pulumi.ProviderResource
{
///
/// API token generated in Dokploy under *Settings > Profile > API/CLI*. May also be set with the `DOKPLOY_API_KEY` environment variable.
///
[Output("apiKey")]
public Output ApiKey { get; private set; } = null!;
///
/// Base URL of the Dokploy instance, for example `https://dokploy.example.com`. A trailing `/api` is optional. May also be set with the `DOKPLOY_HOST` environment variable.
///
[Output("host")]
public Output Host { get; private set; } = null!;
///
/// Create a Provider 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 Provider(string name, ProviderArgs? args = null, CustomResourceOptions? options = null)
: base("dokploy", name, args ?? new ProviderArgs(), MakeResourceOptions(options, ""))
{
}
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
AdditionalSecretOutputs =
{
"apiKey",
},
};
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;
}
///
/// This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider.
///
public global::Pulumi.Output TerraformConfig()
=> global::Pulumi.Deployment.Instance.Call("pulumi:providers:dokploy/terraformConfig", CallArgs.Empty, this);
}
public sealed class ProviderArgs : global::Pulumi.ResourceArgs
{
[Input("apiKey")]
private Input? _apiKey;
///
/// API token generated in Dokploy under *Settings > Profile > API/CLI*. May also be set with the `DOKPLOY_API_KEY` environment variable.
///
public Input? ApiKey
{
get => _apiKey;
set
{
var emptySecret = Output.CreateSecret(0);
_apiKey = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1);
}
}
///
/// Base URL of the Dokploy instance, for example `https://dokploy.example.com`. A trailing `/api` is optional. May also be set with the `DOKPLOY_HOST` environment variable.
///
[Input("host")]
public Input? Host { get; set; }
///
/// Skip TLS certificate verification. Only use this for instances behind a self-signed certificate. Defaults to `False`.
///
[Input("insecureSkipVerify", json: true)]
public Input? InsecureSkipVerify { get; set; }
///
/// Per-request timeout in seconds. Defaults to `60`. May also be set with the `DOKPLOY_TIMEOUT_SECONDS` environment variable.
///
[Input("timeoutSeconds", json: true)]
public Input? TimeoutSeconds { get; set; }
public ProviderArgs()
{
ApiKey = Utilities.GetEnv("DOKPLOY_API_KEY");
Host = Utilities.GetEnv("DOKPLOY_HOST");
TimeoutSeconds = Utilities.GetEnvInt32("DOKPLOY_TIMEOUT_SECONDS");
}
public static new ProviderArgs Empty => new ProviderArgs();
}
///
/// The results of the method.
///
[OutputType]
public sealed class ProviderTerraformConfigResult
{
public readonly ImmutableDictionary Result;
[OutputConstructor]
private ProviderTerraformConfigResult(ImmutableDictionary result)
{
Result = result;
}
}
}