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`.
380 lines
16 KiB
Python
Generated
380 lines
16 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__ = ['CertificateArgs', 'Certificate']
|
|
|
|
@pulumi.input_type
|
|
class CertificateArgs:
|
|
def __init__(__self__, *,
|
|
certificate_data: pulumi.Input[_builtins.str],
|
|
private_key: pulumi.Input[_builtins.str],
|
|
auto_renew: pulumi.Input[Optional[_builtins.bool]] = None,
|
|
name: pulumi.Input[Optional[_builtins.str]] = None,
|
|
server_id: pulumi.Input[Optional[_builtins.str]] = None):
|
|
"""
|
|
The set of arguments for constructing a Certificate resource.
|
|
|
|
:param pulumi.Input[_builtins.str] certificate_data: PEM-encoded certificate chain.
|
|
:param pulumi.Input[_builtins.str] private_key: PEM-encoded private key.
|
|
:param pulumi.Input[_builtins.bool] auto_renew: Whether Dokploy should renew this certificate automatically.
|
|
:param pulumi.Input[_builtins.str] name: Display name of the certificate.
|
|
:param pulumi.Input[_builtins.str] server_id: Server this certificate is installed on.
|
|
"""
|
|
pulumi.set(__self__, "certificate_data", certificate_data)
|
|
pulumi.set(__self__, "private_key", private_key)
|
|
if auto_renew is not None:
|
|
pulumi.set(__self__, "auto_renew", auto_renew)
|
|
if name is not None:
|
|
pulumi.set(__self__, "name", name)
|
|
if server_id is not None:
|
|
pulumi.set(__self__, "server_id", server_id)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="certificateData")
|
|
def certificate_data(self) -> pulumi.Input[_builtins.str]:
|
|
"""
|
|
PEM-encoded certificate chain.
|
|
"""
|
|
return pulumi.get(self, "certificate_data")
|
|
|
|
@certificate_data.setter
|
|
def certificate_data(self, value: pulumi.Input[_builtins.str]):
|
|
pulumi.set(self, "certificate_data", value)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="privateKey")
|
|
def private_key(self) -> pulumi.Input[_builtins.str]:
|
|
"""
|
|
PEM-encoded private key.
|
|
"""
|
|
return pulumi.get(self, "private_key")
|
|
|
|
@private_key.setter
|
|
def private_key(self, value: pulumi.Input[_builtins.str]):
|
|
pulumi.set(self, "private_key", value)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="autoRenew")
|
|
def auto_renew(self) -> pulumi.Input[Optional[_builtins.bool]]:
|
|
"""
|
|
Whether Dokploy should renew this certificate automatically.
|
|
"""
|
|
return pulumi.get(self, "auto_renew")
|
|
|
|
@auto_renew.setter
|
|
def auto_renew(self, value: pulumi.Input[Optional[_builtins.bool]]):
|
|
pulumi.set(self, "auto_renew", value)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter
|
|
def name(self) -> pulumi.Input[Optional[_builtins.str]]:
|
|
"""
|
|
Display name of the certificate.
|
|
"""
|
|
return pulumi.get(self, "name")
|
|
|
|
@name.setter
|
|
def name(self, value: pulumi.Input[Optional[_builtins.str]]):
|
|
pulumi.set(self, "name", value)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="serverId")
|
|
def server_id(self) -> pulumi.Input[Optional[_builtins.str]]:
|
|
"""
|
|
Server this certificate is installed on.
|
|
"""
|
|
return pulumi.get(self, "server_id")
|
|
|
|
@server_id.setter
|
|
def server_id(self, value: pulumi.Input[Optional[_builtins.str]]):
|
|
pulumi.set(self, "server_id", value)
|
|
|
|
|
|
@pulumi.input_type
|
|
class _CertificateState:
|
|
def __init__(__self__, *,
|
|
auto_renew: pulumi.Input[Optional[_builtins.bool]] = None,
|
|
certificate_data: pulumi.Input[Optional[_builtins.str]] = None,
|
|
certificate_path: pulumi.Input[Optional[_builtins.str]] = None,
|
|
name: pulumi.Input[Optional[_builtins.str]] = None,
|
|
private_key: pulumi.Input[Optional[_builtins.str]] = None,
|
|
server_id: pulumi.Input[Optional[_builtins.str]] = None):
|
|
"""
|
|
Input properties used for looking up and filtering Certificate resources.
|
|
|
|
:param pulumi.Input[_builtins.bool] auto_renew: Whether Dokploy should renew this certificate automatically.
|
|
:param pulumi.Input[_builtins.str] certificate_data: PEM-encoded certificate chain.
|
|
:param pulumi.Input[_builtins.str] certificate_path: Path where Dokploy writes the certificate on disk.
|
|
:param pulumi.Input[_builtins.str] name: Display name of the certificate.
|
|
:param pulumi.Input[_builtins.str] private_key: PEM-encoded private key.
|
|
:param pulumi.Input[_builtins.str] server_id: Server this certificate is installed on.
|
|
"""
|
|
if auto_renew is not None:
|
|
pulumi.set(__self__, "auto_renew", auto_renew)
|
|
if certificate_data is not None:
|
|
pulumi.set(__self__, "certificate_data", certificate_data)
|
|
if certificate_path is not None:
|
|
pulumi.set(__self__, "certificate_path", certificate_path)
|
|
if name is not None:
|
|
pulumi.set(__self__, "name", name)
|
|
if private_key is not None:
|
|
pulumi.set(__self__, "private_key", private_key)
|
|
if server_id is not None:
|
|
pulumi.set(__self__, "server_id", server_id)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="autoRenew")
|
|
def auto_renew(self) -> pulumi.Input[Optional[_builtins.bool]]:
|
|
"""
|
|
Whether Dokploy should renew this certificate automatically.
|
|
"""
|
|
return pulumi.get(self, "auto_renew")
|
|
|
|
@auto_renew.setter
|
|
def auto_renew(self, value: pulumi.Input[Optional[_builtins.bool]]):
|
|
pulumi.set(self, "auto_renew", value)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="certificateData")
|
|
def certificate_data(self) -> pulumi.Input[Optional[_builtins.str]]:
|
|
"""
|
|
PEM-encoded certificate chain.
|
|
"""
|
|
return pulumi.get(self, "certificate_data")
|
|
|
|
@certificate_data.setter
|
|
def certificate_data(self, value: pulumi.Input[Optional[_builtins.str]]):
|
|
pulumi.set(self, "certificate_data", value)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="certificatePath")
|
|
def certificate_path(self) -> pulumi.Input[Optional[_builtins.str]]:
|
|
"""
|
|
Path where Dokploy writes the certificate on disk.
|
|
"""
|
|
return pulumi.get(self, "certificate_path")
|
|
|
|
@certificate_path.setter
|
|
def certificate_path(self, value: pulumi.Input[Optional[_builtins.str]]):
|
|
pulumi.set(self, "certificate_path", value)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter
|
|
def name(self) -> pulumi.Input[Optional[_builtins.str]]:
|
|
"""
|
|
Display name of the certificate.
|
|
"""
|
|
return pulumi.get(self, "name")
|
|
|
|
@name.setter
|
|
def name(self, value: pulumi.Input[Optional[_builtins.str]]):
|
|
pulumi.set(self, "name", value)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="privateKey")
|
|
def private_key(self) -> pulumi.Input[Optional[_builtins.str]]:
|
|
"""
|
|
PEM-encoded private key.
|
|
"""
|
|
return pulumi.get(self, "private_key")
|
|
|
|
@private_key.setter
|
|
def private_key(self, value: pulumi.Input[Optional[_builtins.str]]):
|
|
pulumi.set(self, "private_key", value)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="serverId")
|
|
def server_id(self) -> pulumi.Input[Optional[_builtins.str]]:
|
|
"""
|
|
Server this certificate is installed on.
|
|
"""
|
|
return pulumi.get(self, "server_id")
|
|
|
|
@server_id.setter
|
|
def server_id(self, value: pulumi.Input[Optional[_builtins.str]]):
|
|
pulumi.set(self, "server_id", value)
|
|
|
|
|
|
@pulumi.type_token("dokploy:index/certificate:Certificate")
|
|
class Certificate(pulumi.CustomResource):
|
|
@overload
|
|
def __init__(__self__,
|
|
resource_name: str,
|
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
auto_renew: pulumi.Input[Optional[_builtins.bool]] = None,
|
|
certificate_data: pulumi.Input[Optional[_builtins.str]] = None,
|
|
name: pulumi.Input[Optional[_builtins.str]] = None,
|
|
private_key: pulumi.Input[Optional[_builtins.str]] = None,
|
|
server_id: pulumi.Input[Optional[_builtins.str]] = None,
|
|
__props__=None):
|
|
"""
|
|
A TLS certificate uploaded to Dokploy, for domains that use `certificate_type = "custom"`.
|
|
|
|
> The private key is stored in Terraform state. Use a state backend with encryption at rest.
|
|
|
|
|
|
:param str resource_name: The name of the resource.
|
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
:param pulumi.Input[_builtins.bool] auto_renew: Whether Dokploy should renew this certificate automatically.
|
|
:param pulumi.Input[_builtins.str] certificate_data: PEM-encoded certificate chain.
|
|
:param pulumi.Input[_builtins.str] name: Display name of the certificate.
|
|
:param pulumi.Input[_builtins.str] private_key: PEM-encoded private key.
|
|
:param pulumi.Input[_builtins.str] server_id: Server this certificate is installed on.
|
|
"""
|
|
...
|
|
@overload
|
|
def __init__(__self__,
|
|
resource_name: str,
|
|
args: CertificateArgs,
|
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
"""
|
|
A TLS certificate uploaded to Dokploy, for domains that use `certificate_type = "custom"`.
|
|
|
|
> The private key is stored in Terraform state. Use a state backend with encryption at rest.
|
|
|
|
|
|
:param str resource_name: The name of the resource.
|
|
:param CertificateArgs 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(CertificateArgs, 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,
|
|
auto_renew: pulumi.Input[Optional[_builtins.bool]] = None,
|
|
certificate_data: pulumi.Input[Optional[_builtins.str]] = None,
|
|
name: pulumi.Input[Optional[_builtins.str]] = None,
|
|
private_key: pulumi.Input[Optional[_builtins.str]] = None,
|
|
server_id: pulumi.Input[Optional[_builtins.str]] = 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__ = CertificateArgs.__new__(CertificateArgs)
|
|
|
|
__props__.__dict__["auto_renew"] = auto_renew
|
|
if certificate_data is None and not opts.urn:
|
|
raise TypeError("Missing required property 'certificate_data'")
|
|
__props__.__dict__["certificate_data"] = certificate_data
|
|
__props__.__dict__["name"] = name
|
|
if private_key is None and not opts.urn:
|
|
raise TypeError("Missing required property 'private_key'")
|
|
__props__.__dict__["private_key"] = None if private_key is None else pulumi.Output.secret(private_key)
|
|
__props__.__dict__["server_id"] = server_id
|
|
__props__.__dict__["certificate_path"] = None
|
|
secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["privateKey"])
|
|
opts = pulumi.ResourceOptions.merge(opts, secret_opts)
|
|
super(Certificate, __self__).__init__(
|
|
'dokploy:index/certificate:Certificate',
|
|
resource_name,
|
|
__props__,
|
|
opts)
|
|
|
|
@staticmethod
|
|
def get(resource_name: str,
|
|
id: pulumi.Input[str],
|
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
auto_renew: pulumi.Input[Optional[_builtins.bool]] = None,
|
|
certificate_data: pulumi.Input[Optional[_builtins.str]] = None,
|
|
certificate_path: pulumi.Input[Optional[_builtins.str]] = None,
|
|
name: pulumi.Input[Optional[_builtins.str]] = None,
|
|
private_key: pulumi.Input[Optional[_builtins.str]] = None,
|
|
server_id: pulumi.Input[Optional[_builtins.str]] = None) -> 'Certificate':
|
|
"""
|
|
Get an existing Certificate resource's state with the given name, id, and optional extra
|
|
properties used to qualify the lookup.
|
|
|
|
:param str resource_name: The unique name of the resulting resource.
|
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
:param pulumi.Input[_builtins.bool] auto_renew: Whether Dokploy should renew this certificate automatically.
|
|
:param pulumi.Input[_builtins.str] certificate_data: PEM-encoded certificate chain.
|
|
:param pulumi.Input[_builtins.str] certificate_path: Path where Dokploy writes the certificate on disk.
|
|
:param pulumi.Input[_builtins.str] name: Display name of the certificate.
|
|
:param pulumi.Input[_builtins.str] private_key: PEM-encoded private key.
|
|
:param pulumi.Input[_builtins.str] server_id: Server this certificate is installed on.
|
|
"""
|
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
|
|
__props__ = _CertificateState.__new__(_CertificateState)
|
|
|
|
__props__.__dict__["auto_renew"] = auto_renew
|
|
__props__.__dict__["certificate_data"] = certificate_data
|
|
__props__.__dict__["certificate_path"] = certificate_path
|
|
__props__.__dict__["name"] = name
|
|
__props__.__dict__["private_key"] = private_key
|
|
__props__.__dict__["server_id"] = server_id
|
|
return Certificate(resource_name, opts=opts, __props__=__props__)
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="autoRenew")
|
|
def auto_renew(self) -> pulumi.Output[_builtins.bool]:
|
|
"""
|
|
Whether Dokploy should renew this certificate automatically.
|
|
"""
|
|
return pulumi.get(self, "auto_renew")
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="certificateData")
|
|
def certificate_data(self) -> pulumi.Output[_builtins.str]:
|
|
"""
|
|
PEM-encoded certificate chain.
|
|
"""
|
|
return pulumi.get(self, "certificate_data")
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="certificatePath")
|
|
def certificate_path(self) -> pulumi.Output[_builtins.str]:
|
|
"""
|
|
Path where Dokploy writes the certificate on disk.
|
|
"""
|
|
return pulumi.get(self, "certificate_path")
|
|
|
|
@_builtins.property
|
|
@pulumi.getter
|
|
def name(self) -> pulumi.Output[_builtins.str]:
|
|
"""
|
|
Display name of the certificate.
|
|
"""
|
|
return pulumi.get(self, "name")
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="privateKey")
|
|
def private_key(self) -> pulumi.Output[_builtins.str]:
|
|
"""
|
|
PEM-encoded private key.
|
|
"""
|
|
return pulumi.get(self, "private_key")
|
|
|
|
@_builtins.property
|
|
@pulumi.getter(name="serverId")
|
|
def server_id(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
"""
|
|
Server this certificate is installed on.
|
|
"""
|
|
return pulumi.get(self, "server_id")
|
|
|