# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs

__all__ = [
    'Ssh',
    'SshNode',
]

@pulumi.output_type
class Ssh(dict):
    def __init__(__self__, *,
                 agent: Optional[bool] = None,
                 agent_socket: Optional[str] = None,
                 nodes: Optional[Sequence['outputs.SshNode']] = None,
                 password: Optional[str] = None,
                 private_key: Optional[str] = None,
                 socks5_password: Optional[str] = None,
                 socks5_server: Optional[str] = None,
                 socks5_username: Optional[str] = None,
                 username: Optional[str] = None):
        """
        :param bool agent: Whether to use the SSH agent for authentication. Takes precedence over the `private_key` and `password` fields. Defaults to the value of the `PROXMOX_VE_SSH_AGENT` environment variable, or `false` if not set.
        :param str agent_socket: The path to the SSH agent socket. Defaults to the value of the `SSH_AUTH_SOCK` environment variable.
        :param Sequence['SshNodeArgs'] nodes: Overrides for SSH connection configuration for a Proxmox VE node.
        :param str password: The password used for the SSH connection. Defaults to the value of the `password` field of the `provider` block.
        :param str private_key: The unencrypted private key (in PEM format) used for the SSH connection. Defaults to the value of the `PROXMOX_VE_SSH_PRIVATE_KEY` environment variable.
        :param str socks5_password: The password for the SOCKS5 proxy server. Defaults to the value of the `PROXMOX_VE_SSH_SOCKS5_PASSWORD` environment variable.
        :param str socks5_server: The address:port of the SOCKS5 proxy server. Defaults to the value of the `PROXMOX_VE_SSH_SOCKS5_SERVER` environment variable.
        :param str socks5_username: The username for the SOCKS5 proxy server. Defaults to the value of the `PROXMOX_VE_SSH_SOCKS5_USERNAME` environment variable.
        :param str username: The username used for the SSH connection. Defaults to the value of the `username` field of the `provider` block.
        """
        if agent is not None:
            pulumi.set(__self__, "agent", agent)
        if agent_socket is not None:
            pulumi.set(__self__, "agent_socket", agent_socket)
        if nodes is not None:
            pulumi.set(__self__, "nodes", nodes)
        if password is not None:
            pulumi.set(__self__, "password", password)
        if private_key is not None:
            pulumi.set(__self__, "private_key", private_key)
        if socks5_password is not None:
            pulumi.set(__self__, "socks5_password", socks5_password)
        if socks5_server is not None:
            pulumi.set(__self__, "socks5_server", socks5_server)
        if socks5_username is not None:
            pulumi.set(__self__, "socks5_username", socks5_username)
        if username is not None:
            pulumi.set(__self__, "username", username)

    @property
    @pulumi.getter
    def agent(self) -> Optional[bool]:
        """
        Whether to use the SSH agent for authentication. Takes precedence over the `private_key` and `password` fields. Defaults to the value of the `PROXMOX_VE_SSH_AGENT` environment variable, or `false` if not set.
        """
        return pulumi.get(self, "agent")

    @property
    @pulumi.getter(name="agentSocket")
    def agent_socket(self) -> Optional[str]:
        """
        The path to the SSH agent socket. Defaults to the value of the `SSH_AUTH_SOCK` environment variable.
        """
        return pulumi.get(self, "agent_socket")

    @property
    @pulumi.getter
    def nodes(self) -> Optional[Sequence['outputs.SshNode']]:
        """
        Overrides for SSH connection configuration for a Proxmox VE node.
        """
        return pulumi.get(self, "nodes")

    @property
    @pulumi.getter
    def password(self) -> Optional[str]:
        """
        The password used for the SSH connection. Defaults to the value of the `password` field of the `provider` block.
        """
        return pulumi.get(self, "password")

    @property
    @pulumi.getter(name="privateKey")
    def private_key(self) -> Optional[str]:
        """
        The unencrypted private key (in PEM format) used for the SSH connection. Defaults to the value of the `PROXMOX_VE_SSH_PRIVATE_KEY` environment variable.
        """
        return pulumi.get(self, "private_key")

    @property
    @pulumi.getter(name="socks5Password")
    def socks5_password(self) -> Optional[str]:
        """
        The password for the SOCKS5 proxy server. Defaults to the value of the `PROXMOX_VE_SSH_SOCKS5_PASSWORD` environment variable.
        """
        return pulumi.get(self, "socks5_password")

    @property
    @pulumi.getter(name="socks5Server")
    def socks5_server(self) -> Optional[str]:
        """
        The address:port of the SOCKS5 proxy server. Defaults to the value of the `PROXMOX_VE_SSH_SOCKS5_SERVER` environment variable.
        """
        return pulumi.get(self, "socks5_server")

    @property
    @pulumi.getter(name="socks5Username")
    def socks5_username(self) -> Optional[str]:
        """
        The username for the SOCKS5 proxy server. Defaults to the value of the `PROXMOX_VE_SSH_SOCKS5_USERNAME` environment variable.
        """
        return pulumi.get(self, "socks5_username")

    @property
    @pulumi.getter
    def username(self) -> Optional[str]:
        """
        The username used for the SSH connection. Defaults to the value of the `username` field of the `provider` block.
        """
        return pulumi.get(self, "username")


@pulumi.output_type
class SshNode(dict):
    def __init__(__self__, *,
                 address: str,
                 name: str,
                 port: Optional[int] = None):
        """
        :param str address: The address of the Proxmox VE node.
        :param str name: The name of the Proxmox VE node.
        :param int port: The port of the Proxmox VE node.
        """
        pulumi.set(__self__, "address", address)
        pulumi.set(__self__, "name", name)
        if port is not None:
            pulumi.set(__self__, "port", port)

    @property
    @pulumi.getter
    def address(self) -> str:
        """
        The address of the Proxmox VE node.
        """
        return pulumi.get(self, "address")

    @property
    @pulumi.getter
    def name(self) -> str:
        """
        The name of the Proxmox VE node.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def port(self) -> Optional[int]:
        """
        The port of the Proxmox VE node.
        """
        return pulumi.get(self, "port")


