Six new resources from terraform-provider-dokploy v0.2.0 -- Network, DnsProvider, VaultProvider, Schedule, VolumeBackup and Libsql -- plus the new properties on Domain (`enabled`), Compose (`serviceNetworks`, `createEnvFile`, `icon`) and Application. Verified with `pulumi up` against a live v0.30.2 instance: create, preview-clean, and destroy. The upstream provider also now refuses a volume Mount with no `volumeName`, which Dokploy would otherwise turn into an anonymous Docker volume recreated on every deploy. That surfaces here at preview time, before anything exists. Two things made that fix nearly invisible to Pulumi users, so this commit fixes the second one: the bridge resolves the upstream `docs/` through the Go module cache, where a locally `replace`d dependency never lands, so tfgen was emitting every resource with no description at all. UpstreamRepoPath now points at the checkout and all 445 inputs carry documentation -- with names rendered per language, so Python readers see `volume_name` where TypeScript readers see `volumeName`.
218 lines
11 KiB
Python
Generated
218 lines
11 KiB
Python
Generated
# coding=utf-8
|
|
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
|
|
import builtins as _builtins
|
|
import warnings
|
|
import sys
|
|
import pulumi
|
|
import pulumi.runtime
|
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
if sys.version_info >= (3, 11):
|
|
from typing import NotRequired, TypedDict, TypeAlias
|
|
else:
|
|
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
from . import _utilities
|
|
|
|
__all__ = ['ProviderArgs', 'Provider']
|
|
|
|
@pulumi.input_type
|
|
class ProviderArgs:
|
|
def __init__(__self__, *,
|
|
api_key: pulumi.Input[Optional[_builtins.str]] = None,
|
|
host: pulumi.Input[Optional[_builtins.str]] = None,
|
|
insecure_skip_verify: pulumi.Input[Optional[_builtins.bool]] = None,
|
|
timeout_seconds: pulumi.Input[Optional[_builtins.int]] = None):
|
|
"""
|
|
The set of arguments for constructing a Provider resource.
|
|
|
|
:param pulumi.Input[_builtins.str] api_key: API token generated in Dokploy under *Settings > Profile > API/CLI*. May also be set with the `DOKPLOY_API_KEY` environment variable.
|
|
:param pulumi.Input[_builtins.str] host: 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.
|
|
:param pulumi.Input[_builtins.bool] insecure_skip_verify: Skip TLS certificate verification. Only use this for instances behind a self-signed certificate. Defaults to `false`.
|
|
:param pulumi.Input[_builtins.int] timeout_seconds: Per-request timeout in seconds. Defaults to `60`. May also be set with the `DOKPLOY_TIMEOUT_SECONDS` environment variable.
|
|
"""
|
|
if api_key is None:
|
|
api_key = _utilities.get_env('DOKPLOY_API_KEY')
|
|
if api_key is not None:
|
|
pulumi.set(__self__, "api_key", api_key)
|
|
if host is None:
|
|
host = _utilities.get_env('DOKPLOY_HOST')
|
|
if host is not None:
|
|
pulumi.set(__self__, "host", host)
|
|
if insecure_skip_verify is not None:
|
|
pulumi.set(__self__, "insecure_skip_verify", insecure_skip_verify)
|
|
if timeout_seconds is None:
|
|
timeout_seconds = _utilities.get_env_int('DOKPLOY_TIMEOUT_SECONDS')
|
|
if timeout_seconds is not None:
|
|
pulumi.set(__self__, "timeout_seconds", timeout_seconds)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="apiKey")
|
|
def api_key(self) -> pulumi.Input[Optional[_builtins.str]]:
|
|
"""
|
|
API token generated in Dokploy under *Settings > Profile > API/CLI*. May also be set with the `DOKPLOY_API_KEY` environment variable.
|
|
"""
|
|
return pulumi.get(self, "api_key")
|
|
|
|
@api_key.setter
|
|
def api_key(self, value: pulumi.Input[Optional[_builtins.str]]):
|
|
pulumi.set(self, "api_key", value)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter
|
|
def host(self) -> pulumi.Input[Optional[_builtins.str]]:
|
|
"""
|
|
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.
|
|
"""
|
|
return pulumi.get(self, "host")
|
|
|
|
@host.setter
|
|
def host(self, value: pulumi.Input[Optional[_builtins.str]]):
|
|
pulumi.set(self, "host", value)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="insecureSkipVerify")
|
|
def insecure_skip_verify(self) -> pulumi.Input[Optional[_builtins.bool]]:
|
|
"""
|
|
Skip TLS certificate verification. Only use this for instances behind a self-signed certificate. Defaults to `false`.
|
|
"""
|
|
return pulumi.get(self, "insecure_skip_verify")
|
|
|
|
@insecure_skip_verify.setter
|
|
def insecure_skip_verify(self, value: pulumi.Input[Optional[_builtins.bool]]):
|
|
pulumi.set(self, "insecure_skip_verify", value)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="timeoutSeconds")
|
|
def timeout_seconds(self) -> pulumi.Input[Optional[_builtins.int]]:
|
|
"""
|
|
Per-request timeout in seconds. Defaults to `60`. May also be set with the `DOKPLOY_TIMEOUT_SECONDS` environment variable.
|
|
"""
|
|
return pulumi.get(self, "timeout_seconds")
|
|
|
|
@timeout_seconds.setter
|
|
def timeout_seconds(self, value: pulumi.Input[Optional[_builtins.int]]):
|
|
pulumi.set(self, "timeout_seconds", value)
|
|
|
|
|
|
@pulumi.type_token("pulumi:providers:dokploy")
|
|
class Provider(pulumi.ProviderResource):
|
|
@overload
|
|
def __init__(__self__,
|
|
resource_name: str,
|
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
api_key: pulumi.Input[Optional[_builtins.str]] = None,
|
|
host: pulumi.Input[Optional[_builtins.str]] = None,
|
|
insecure_skip_verify: pulumi.Input[Optional[_builtins.bool]] = None,
|
|
timeout_seconds: pulumi.Input[Optional[_builtins.int]] = None,
|
|
__props__=None):
|
|
"""
|
|
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.
|
|
|
|
|
|
:param str resource_name: The name of the resource.
|
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
:param pulumi.Input[_builtins.str] api_key: API token generated in Dokploy under *Settings > Profile > API/CLI*. May also be set with the `DOKPLOY_API_KEY` environment variable.
|
|
:param pulumi.Input[_builtins.str] host: 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.
|
|
:param pulumi.Input[_builtins.bool] insecure_skip_verify: Skip TLS certificate verification. Only use this for instances behind a self-signed certificate. Defaults to `false`.
|
|
:param pulumi.Input[_builtins.int] timeout_seconds: Per-request timeout in seconds. Defaults to `60`. May also be set with the `DOKPLOY_TIMEOUT_SECONDS` environment variable.
|
|
"""
|
|
...
|
|
@overload
|
|
def __init__(__self__,
|
|
resource_name: str,
|
|
args: Optional[ProviderArgs] = None,
|
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
"""
|
|
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.
|
|
|
|
|
|
:param str resource_name: The name of the resource.
|
|
:param ProviderArgs args: The arguments to use to populate this resource's properties.
|
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
"""
|
|
...
|
|
def __init__(__self__, resource_name: str, *args, **kwargs):
|
|
resource_args, opts = _utilities.get_resource_args_opts(ProviderArgs, pulumi.ResourceOptions, *args, **kwargs)
|
|
if resource_args is not None:
|
|
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
|
else:
|
|
__self__._internal_init(resource_name, *args, **kwargs)
|
|
|
|
def _internal_init(__self__,
|
|
resource_name: str,
|
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
api_key: pulumi.Input[Optional[_builtins.str]] = None,
|
|
host: pulumi.Input[Optional[_builtins.str]] = None,
|
|
insecure_skip_verify: pulumi.Input[Optional[_builtins.bool]] = None,
|
|
timeout_seconds: pulumi.Input[Optional[_builtins.int]] = None,
|
|
__props__=None):
|
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
|
if opts.id is None:
|
|
if __props__ is not None:
|
|
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
__props__ = ProviderArgs.__new__(ProviderArgs)
|
|
|
|
if api_key is None:
|
|
api_key = _utilities.get_env('DOKPLOY_API_KEY')
|
|
__props__.__dict__["api_key"] = None if api_key is None else pulumi.Output.secret(api_key)
|
|
if host is None:
|
|
host = _utilities.get_env('DOKPLOY_HOST')
|
|
__props__.__dict__["host"] = host
|
|
__props__.__dict__["insecure_skip_verify"] = pulumi.Output.from_input(insecure_skip_verify).apply(pulumi.runtime.to_json) if insecure_skip_verify is not None else None
|
|
if timeout_seconds is None:
|
|
timeout_seconds = _utilities.get_env_int('DOKPLOY_TIMEOUT_SECONDS')
|
|
__props__.__dict__["timeout_seconds"] = pulumi.Output.from_input(timeout_seconds).apply(pulumi.runtime.to_json) if timeout_seconds is not None else None
|
|
secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["apiKey"])
|
|
opts = pulumi.ResourceOptions.merge(opts, secret_opts)
|
|
super(Provider, __self__).__init__(
|
|
'dokploy',
|
|
resource_name,
|
|
__props__,
|
|
opts)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="apiKey")
|
|
def api_key(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
"""
|
|
API token generated in Dokploy under *Settings > Profile > API/CLI*. May also be set with the `DOKPLOY_API_KEY` environment variable.
|
|
"""
|
|
return pulumi.get(self, "api_key")
|
|
|
|
@_builtins.property
|
|
@pulumi.getter
|
|
def host(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
"""
|
|
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.
|
|
"""
|
|
return pulumi.get(self, "host")
|
|
|
|
@pulumi.output_type
|
|
class TerraformConfigResult:
|
|
def __init__(__self__, result=None):
|
|
if result and not isinstance(result, dict):
|
|
raise TypeError("Expected argument 'result' to be a dict")
|
|
pulumi.set(__self__, "result", result)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter
|
|
def result(self) -> Mapping[str, Any]:
|
|
return pulumi.get(self, "result")
|
|
|
|
def terraform_config(__self__) -> pulumi.Output['Provider.TerraformConfigResult']:
|
|
"""
|
|
This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider.
|
|
"""
|
|
__args__ = dict()
|
|
__args__['__self__'] = __self__
|
|
return pulumi.runtime.call('pulumi:providers:dokploy/terraformConfig', __args__, res=__self__, typ=Provider.TerraformConfigResult)
|
|
|