Bridge terraform-provider-dokploy into a Pulumi provider
18 resources and 5 data sources mapped into the dokploy:index module, with SDKs generated for TypeScript, Python, Go and .NET.
This commit is contained in:
373
sdk/python/pulumi_dokploy/certificate.py
generated
Normal file
373
sdk/python/pulumi_dokploy/certificate.py
generated
Normal file
@@ -0,0 +1,373 @@
|
||||
# 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: Optional[pulumi.Input[_builtins.bool]] = None,
|
||||
name: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
server_id: Optional[pulumi.Input[_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) -> Optional[pulumi.Input[_builtins.bool]]:
|
||||
"""
|
||||
Whether Dokploy should renew this certificate automatically.
|
||||
"""
|
||||
return pulumi.get(self, "auto_renew")
|
||||
|
||||
@auto_renew.setter
|
||||
def auto_renew(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
||||
pulumi.set(self, "auto_renew", value)
|
||||
|
||||
@_builtins.property
|
||||
@pulumi.getter
|
||||
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
||||
"""
|
||||
Display name of the certificate.
|
||||
"""
|
||||
return pulumi.get(self, "name")
|
||||
|
||||
@name.setter
|
||||
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
||||
pulumi.set(self, "name", value)
|
||||
|
||||
@_builtins.property
|
||||
@pulumi.getter(name="serverId")
|
||||
def server_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
||||
"""
|
||||
Server this certificate is installed on.
|
||||
"""
|
||||
return pulumi.get(self, "server_id")
|
||||
|
||||
@server_id.setter
|
||||
def server_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
||||
pulumi.set(self, "server_id", value)
|
||||
|
||||
|
||||
@pulumi.input_type
|
||||
class _CertificateState:
|
||||
def __init__(__self__, *,
|
||||
auto_renew: Optional[pulumi.Input[_builtins.bool]] = None,
|
||||
certificate_data: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
certificate_path: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
name: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
private_key: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
server_id: Optional[pulumi.Input[_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) -> Optional[pulumi.Input[_builtins.bool]]:
|
||||
"""
|
||||
Whether Dokploy should renew this certificate automatically.
|
||||
"""
|
||||
return pulumi.get(self, "auto_renew")
|
||||
|
||||
@auto_renew.setter
|
||||
def auto_renew(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
||||
pulumi.set(self, "auto_renew", value)
|
||||
|
||||
@_builtins.property
|
||||
@pulumi.getter(name="certificateData")
|
||||
def certificate_data(self) -> Optional[pulumi.Input[_builtins.str]]:
|
||||
"""
|
||||
PEM-encoded certificate chain.
|
||||
"""
|
||||
return pulumi.get(self, "certificate_data")
|
||||
|
||||
@certificate_data.setter
|
||||
def certificate_data(self, value: Optional[pulumi.Input[_builtins.str]]):
|
||||
pulumi.set(self, "certificate_data", value)
|
||||
|
||||
@_builtins.property
|
||||
@pulumi.getter(name="certificatePath")
|
||||
def certificate_path(self) -> Optional[pulumi.Input[_builtins.str]]:
|
||||
"""
|
||||
Path where Dokploy writes the certificate on disk.
|
||||
"""
|
||||
return pulumi.get(self, "certificate_path")
|
||||
|
||||
@certificate_path.setter
|
||||
def certificate_path(self, value: Optional[pulumi.Input[_builtins.str]]):
|
||||
pulumi.set(self, "certificate_path", value)
|
||||
|
||||
@_builtins.property
|
||||
@pulumi.getter
|
||||
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
||||
"""
|
||||
Display name of the certificate.
|
||||
"""
|
||||
return pulumi.get(self, "name")
|
||||
|
||||
@name.setter
|
||||
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
||||
pulumi.set(self, "name", value)
|
||||
|
||||
@_builtins.property
|
||||
@pulumi.getter(name="privateKey")
|
||||
def private_key(self) -> Optional[pulumi.Input[_builtins.str]]:
|
||||
"""
|
||||
PEM-encoded private key.
|
||||
"""
|
||||
return pulumi.get(self, "private_key")
|
||||
|
||||
@private_key.setter
|
||||
def private_key(self, value: Optional[pulumi.Input[_builtins.str]]):
|
||||
pulumi.set(self, "private_key", value)
|
||||
|
||||
@_builtins.property
|
||||
@pulumi.getter(name="serverId")
|
||||
def server_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
||||
"""
|
||||
Server this certificate is installed on.
|
||||
"""
|
||||
return pulumi.get(self, "server_id")
|
||||
|
||||
@server_id.setter
|
||||
def server_id(self, value: Optional[pulumi.Input[_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: Optional[pulumi.Input[_builtins.bool]] = None,
|
||||
certificate_data: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
name: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
private_key: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
server_id: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
__props__=None):
|
||||
"""
|
||||
Create a Certificate resource with the given unique name, props, and options.
|
||||
|
||||
: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):
|
||||
"""
|
||||
Create a Certificate resource with the given unique name, props, and options.
|
||||
|
||||
: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: Optional[pulumi.Input[_builtins.bool]] = None,
|
||||
certificate_data: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
name: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
private_key: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
server_id: Optional[pulumi.Input[_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: Optional[pulumi.Input[_builtins.bool]] = None,
|
||||
certificate_data: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
certificate_path: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
name: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
private_key: Optional[pulumi.Input[_builtins.str]] = None,
|
||||
server_id: Optional[pulumi.Input[_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")
|
||||
|
||||
Reference in New Issue
Block a user