# 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
from ._inputs import *

__all__ = ['EnvironmentArgs', 'Environment']

@pulumi.input_type
class EnvironmentArgs:
    def __init__(__self__, *,
                 cluster_id: pulumi.Input[str],
                 project_id: pulumi.Input[str],
                 environment_variable_aliases: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableAliasArgs']]]] = None,
                 environment_variable_overrides: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableOverrideArgs']]]] = None,
                 environment_variables: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableArgs']]]] = None,
                 mode: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 secret_aliases: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretAliasArgs']]]] = None,
                 secret_overrides: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretOverrideArgs']]]] = None,
                 secrets: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretArgs']]]] = None):
        """
        The set of arguments for constructing a Environment resource.
        :param pulumi.Input[str] cluster_id: Id of the cluster [NOTE: can't be updated after creation].
        :param pulumi.Input[str] project_id: Id of the project.
        :param pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableAliasArgs']]] environment_variable_aliases: List of environment variable aliases linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableOverrideArgs']]] environment_variable_overrides: List of environment variable overrides linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableArgs']]] environment_variables: List of environment variables linked to this environment.
        :param pulumi.Input[str] mode: Mode of the environment. - Can be: `DEVELOPMENT`, `PREVIEW`, `PRODUCTION`, `STAGING`. - Default: `DEVELOPMENT`.
        :param pulumi.Input[str] name: Name of the environment.
        :param pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretAliasArgs']]] secret_aliases: List of secret aliases linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretOverrideArgs']]] secret_overrides: List of secret overrides linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretArgs']]] secrets: List of secrets linked to this environment.
        """
        pulumi.set(__self__, "cluster_id", cluster_id)
        pulumi.set(__self__, "project_id", project_id)
        if environment_variable_aliases is not None:
            pulumi.set(__self__, "environment_variable_aliases", environment_variable_aliases)
        if environment_variable_overrides is not None:
            pulumi.set(__self__, "environment_variable_overrides", environment_variable_overrides)
        if environment_variables is not None:
            pulumi.set(__self__, "environment_variables", environment_variables)
        if mode is not None:
            pulumi.set(__self__, "mode", mode)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if secret_aliases is not None:
            pulumi.set(__self__, "secret_aliases", secret_aliases)
        if secret_overrides is not None:
            pulumi.set(__self__, "secret_overrides", secret_overrides)
        if secrets is not None:
            pulumi.set(__self__, "secrets", secrets)

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> pulumi.Input[str]:
        """
        Id of the cluster [NOTE: can't be updated after creation].
        """
        return pulumi.get(self, "cluster_id")

    @cluster_id.setter
    def cluster_id(self, value: pulumi.Input[str]):
        pulumi.set(self, "cluster_id", value)

    @property
    @pulumi.getter(name="projectId")
    def project_id(self) -> pulumi.Input[str]:
        """
        Id of the project.
        """
        return pulumi.get(self, "project_id")

    @project_id.setter
    def project_id(self, value: pulumi.Input[str]):
        pulumi.set(self, "project_id", value)

    @property
    @pulumi.getter(name="environmentVariableAliases")
    def environment_variable_aliases(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableAliasArgs']]]]:
        """
        List of environment variable aliases linked to this environment.
        """
        return pulumi.get(self, "environment_variable_aliases")

    @environment_variable_aliases.setter
    def environment_variable_aliases(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableAliasArgs']]]]):
        pulumi.set(self, "environment_variable_aliases", value)

    @property
    @pulumi.getter(name="environmentVariableOverrides")
    def environment_variable_overrides(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableOverrideArgs']]]]:
        """
        List of environment variable overrides linked to this environment.
        """
        return pulumi.get(self, "environment_variable_overrides")

    @environment_variable_overrides.setter
    def environment_variable_overrides(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableOverrideArgs']]]]):
        pulumi.set(self, "environment_variable_overrides", value)

    @property
    @pulumi.getter(name="environmentVariables")
    def environment_variables(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableArgs']]]]:
        """
        List of environment variables linked to this environment.
        """
        return pulumi.get(self, "environment_variables")

    @environment_variables.setter
    def environment_variables(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableArgs']]]]):
        pulumi.set(self, "environment_variables", value)

    @property
    @pulumi.getter
    def mode(self) -> Optional[pulumi.Input[str]]:
        """
        Mode of the environment. - Can be: `DEVELOPMENT`, `PREVIEW`, `PRODUCTION`, `STAGING`. - Default: `DEVELOPMENT`.
        """
        return pulumi.get(self, "mode")

    @mode.setter
    def mode(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "mode", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        Name of the environment.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter(name="secretAliases")
    def secret_aliases(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretAliasArgs']]]]:
        """
        List of secret aliases linked to this environment.
        """
        return pulumi.get(self, "secret_aliases")

    @secret_aliases.setter
    def secret_aliases(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretAliasArgs']]]]):
        pulumi.set(self, "secret_aliases", value)

    @property
    @pulumi.getter(name="secretOverrides")
    def secret_overrides(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretOverrideArgs']]]]:
        """
        List of secret overrides linked to this environment.
        """
        return pulumi.get(self, "secret_overrides")

    @secret_overrides.setter
    def secret_overrides(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretOverrideArgs']]]]):
        pulumi.set(self, "secret_overrides", value)

    @property
    @pulumi.getter
    def secrets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretArgs']]]]:
        """
        List of secrets linked to this environment.
        """
        return pulumi.get(self, "secrets")

    @secrets.setter
    def secrets(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretArgs']]]]):
        pulumi.set(self, "secrets", value)


@pulumi.input_type
class _EnvironmentState:
    def __init__(__self__, *,
                 built_in_environment_variables: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentBuiltInEnvironmentVariableArgs']]]] = None,
                 cluster_id: Optional[pulumi.Input[str]] = None,
                 environment_variable_aliases: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableAliasArgs']]]] = None,
                 environment_variable_overrides: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableOverrideArgs']]]] = None,
                 environment_variables: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableArgs']]]] = None,
                 mode: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 project_id: Optional[pulumi.Input[str]] = None,
                 secret_aliases: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretAliasArgs']]]] = None,
                 secret_overrides: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretOverrideArgs']]]] = None,
                 secrets: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretArgs']]]] = None):
        """
        Input properties used for looking up and filtering Environment resources.
        :param pulumi.Input[Sequence[pulumi.Input['EnvironmentBuiltInEnvironmentVariableArgs']]] built_in_environment_variables: List of built-in environment variables linked to this environment.
        :param pulumi.Input[str] cluster_id: Id of the cluster [NOTE: can't be updated after creation].
        :param pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableAliasArgs']]] environment_variable_aliases: List of environment variable aliases linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableOverrideArgs']]] environment_variable_overrides: List of environment variable overrides linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableArgs']]] environment_variables: List of environment variables linked to this environment.
        :param pulumi.Input[str] mode: Mode of the environment. - Can be: `DEVELOPMENT`, `PREVIEW`, `PRODUCTION`, `STAGING`. - Default: `DEVELOPMENT`.
        :param pulumi.Input[str] name: Name of the environment.
        :param pulumi.Input[str] project_id: Id of the project.
        :param pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretAliasArgs']]] secret_aliases: List of secret aliases linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretOverrideArgs']]] secret_overrides: List of secret overrides linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretArgs']]] secrets: List of secrets linked to this environment.
        """
        if built_in_environment_variables is not None:
            pulumi.set(__self__, "built_in_environment_variables", built_in_environment_variables)
        if cluster_id is not None:
            pulumi.set(__self__, "cluster_id", cluster_id)
        if environment_variable_aliases is not None:
            pulumi.set(__self__, "environment_variable_aliases", environment_variable_aliases)
        if environment_variable_overrides is not None:
            pulumi.set(__self__, "environment_variable_overrides", environment_variable_overrides)
        if environment_variables is not None:
            pulumi.set(__self__, "environment_variables", environment_variables)
        if mode is not None:
            pulumi.set(__self__, "mode", mode)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if project_id is not None:
            pulumi.set(__self__, "project_id", project_id)
        if secret_aliases is not None:
            pulumi.set(__self__, "secret_aliases", secret_aliases)
        if secret_overrides is not None:
            pulumi.set(__self__, "secret_overrides", secret_overrides)
        if secrets is not None:
            pulumi.set(__self__, "secrets", secrets)

    @property
    @pulumi.getter(name="builtInEnvironmentVariables")
    def built_in_environment_variables(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentBuiltInEnvironmentVariableArgs']]]]:
        """
        List of built-in environment variables linked to this environment.
        """
        return pulumi.get(self, "built_in_environment_variables")

    @built_in_environment_variables.setter
    def built_in_environment_variables(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentBuiltInEnvironmentVariableArgs']]]]):
        pulumi.set(self, "built_in_environment_variables", value)

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> Optional[pulumi.Input[str]]:
        """
        Id of the cluster [NOTE: can't be updated after creation].
        """
        return pulumi.get(self, "cluster_id")

    @cluster_id.setter
    def cluster_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "cluster_id", value)

    @property
    @pulumi.getter(name="environmentVariableAliases")
    def environment_variable_aliases(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableAliasArgs']]]]:
        """
        List of environment variable aliases linked to this environment.
        """
        return pulumi.get(self, "environment_variable_aliases")

    @environment_variable_aliases.setter
    def environment_variable_aliases(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableAliasArgs']]]]):
        pulumi.set(self, "environment_variable_aliases", value)

    @property
    @pulumi.getter(name="environmentVariableOverrides")
    def environment_variable_overrides(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableOverrideArgs']]]]:
        """
        List of environment variable overrides linked to this environment.
        """
        return pulumi.get(self, "environment_variable_overrides")

    @environment_variable_overrides.setter
    def environment_variable_overrides(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableOverrideArgs']]]]):
        pulumi.set(self, "environment_variable_overrides", value)

    @property
    @pulumi.getter(name="environmentVariables")
    def environment_variables(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableArgs']]]]:
        """
        List of environment variables linked to this environment.
        """
        return pulumi.get(self, "environment_variables")

    @environment_variables.setter
    def environment_variables(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentEnvironmentVariableArgs']]]]):
        pulumi.set(self, "environment_variables", value)

    @property
    @pulumi.getter
    def mode(self) -> Optional[pulumi.Input[str]]:
        """
        Mode of the environment. - Can be: `DEVELOPMENT`, `PREVIEW`, `PRODUCTION`, `STAGING`. - Default: `DEVELOPMENT`.
        """
        return pulumi.get(self, "mode")

    @mode.setter
    def mode(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "mode", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        Name of the environment.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter(name="projectId")
    def project_id(self) -> Optional[pulumi.Input[str]]:
        """
        Id of the project.
        """
        return pulumi.get(self, "project_id")

    @project_id.setter
    def project_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "project_id", value)

    @property
    @pulumi.getter(name="secretAliases")
    def secret_aliases(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretAliasArgs']]]]:
        """
        List of secret aliases linked to this environment.
        """
        return pulumi.get(self, "secret_aliases")

    @secret_aliases.setter
    def secret_aliases(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretAliasArgs']]]]):
        pulumi.set(self, "secret_aliases", value)

    @property
    @pulumi.getter(name="secretOverrides")
    def secret_overrides(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretOverrideArgs']]]]:
        """
        List of secret overrides linked to this environment.
        """
        return pulumi.get(self, "secret_overrides")

    @secret_overrides.setter
    def secret_overrides(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretOverrideArgs']]]]):
        pulumi.set(self, "secret_overrides", value)

    @property
    @pulumi.getter
    def secrets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretArgs']]]]:
        """
        List of secrets linked to this environment.
        """
        return pulumi.get(self, "secrets")

    @secrets.setter
    def secrets(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentSecretArgs']]]]):
        pulumi.set(self, "secrets", value)


class Environment(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 cluster_id: Optional[pulumi.Input[str]] = None,
                 environment_variable_aliases: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentEnvironmentVariableAliasArgs']]]]] = None,
                 environment_variable_overrides: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentEnvironmentVariableOverrideArgs']]]]] = None,
                 environment_variables: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentEnvironmentVariableArgs']]]]] = None,
                 mode: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 project_id: Optional[pulumi.Input[str]] = None,
                 secret_aliases: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentSecretAliasArgs']]]]] = None,
                 secret_overrides: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentSecretOverrideArgs']]]]] = None,
                 secrets: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentSecretArgs']]]]] = None,
                 __props__=None):
        """
        ## # Environment (Resource)

        Provides a Qovery environment resource. This can be used to create and manage Qovery environments.

        ## Example

        ```python
        import pulumi
        import ediri_qovery as qovery

        my_environment = qovery.Environment("myEnvironment",
            project_id=qovery_project["my_project"]["id"],
            cluster_id=qovery_cluster["my_cluster"]["id"],
            mode="DEVELOPMENT",
            environment_variables=[qovery.EnvironmentEnvironmentVariableArgs(
                key="ENV_VAR_KEY",
                value="ENV_VAR_VALUE",
            )],
            environment_variable_aliases=[qovery.EnvironmentEnvironmentVariableAliasArgs(
                key="ENV_VAR_KEY_ALIAS",
                value="ENV_VAR_KEY",
            )],
            environment_variable_overrides=[qovery.EnvironmentEnvironmentVariableOverrideArgs(
                key="SOME_PROJECT_VARIABLE",
                value="OVERRIDDEN_VALUE",
            )],
            secrets=[qovery.EnvironmentSecretArgs(
                key="SECRET_KEY",
                value="SECRET_VALUE",
            )],
            secret_aliases=[qovery.EnvironmentSecretAliasArgs(
                key="SECRET_KEY_ALIAS",
                value="SECRET_KEY",
            )],
            secret_overrides=[qovery.EnvironmentSecretOverrideArgs(
                key="SOME_PROJECT_SECRET",
                value="OVERRIDDEN_VALUE",
            )],
            opts=pulumi.ResourceOptions(depends_on=[qovery_project["my_project"]]))
        ```

        You can find complete examples within these repositories:

        * Deploy an Application and Database within 3 environments

        ## Import

        ```sh
         $ pulumi import qovery:index/environment:Environment my_environment "<environment_id>"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] cluster_id: Id of the cluster [NOTE: can't be updated after creation].
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentEnvironmentVariableAliasArgs']]]] environment_variable_aliases: List of environment variable aliases linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentEnvironmentVariableOverrideArgs']]]] environment_variable_overrides: List of environment variable overrides linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentEnvironmentVariableArgs']]]] environment_variables: List of environment variables linked to this environment.
        :param pulumi.Input[str] mode: Mode of the environment. - Can be: `DEVELOPMENT`, `PREVIEW`, `PRODUCTION`, `STAGING`. - Default: `DEVELOPMENT`.
        :param pulumi.Input[str] name: Name of the environment.
        :param pulumi.Input[str] project_id: Id of the project.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentSecretAliasArgs']]]] secret_aliases: List of secret aliases linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentSecretOverrideArgs']]]] secret_overrides: List of secret overrides linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentSecretArgs']]]] secrets: List of secrets linked to this environment.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: EnvironmentArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        ## # Environment (Resource)

        Provides a Qovery environment resource. This can be used to create and manage Qovery environments.

        ## Example

        ```python
        import pulumi
        import ediri_qovery as qovery

        my_environment = qovery.Environment("myEnvironment",
            project_id=qovery_project["my_project"]["id"],
            cluster_id=qovery_cluster["my_cluster"]["id"],
            mode="DEVELOPMENT",
            environment_variables=[qovery.EnvironmentEnvironmentVariableArgs(
                key="ENV_VAR_KEY",
                value="ENV_VAR_VALUE",
            )],
            environment_variable_aliases=[qovery.EnvironmentEnvironmentVariableAliasArgs(
                key="ENV_VAR_KEY_ALIAS",
                value="ENV_VAR_KEY",
            )],
            environment_variable_overrides=[qovery.EnvironmentEnvironmentVariableOverrideArgs(
                key="SOME_PROJECT_VARIABLE",
                value="OVERRIDDEN_VALUE",
            )],
            secrets=[qovery.EnvironmentSecretArgs(
                key="SECRET_KEY",
                value="SECRET_VALUE",
            )],
            secret_aliases=[qovery.EnvironmentSecretAliasArgs(
                key="SECRET_KEY_ALIAS",
                value="SECRET_KEY",
            )],
            secret_overrides=[qovery.EnvironmentSecretOverrideArgs(
                key="SOME_PROJECT_SECRET",
                value="OVERRIDDEN_VALUE",
            )],
            opts=pulumi.ResourceOptions(depends_on=[qovery_project["my_project"]]))
        ```

        You can find complete examples within these repositories:

        * Deploy an Application and Database within 3 environments

        ## Import

        ```sh
         $ pulumi import qovery:index/environment:Environment my_environment "<environment_id>"
        ```

        :param str resource_name: The name of the resource.
        :param EnvironmentArgs 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(EnvironmentArgs, 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,
                 cluster_id: Optional[pulumi.Input[str]] = None,
                 environment_variable_aliases: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentEnvironmentVariableAliasArgs']]]]] = None,
                 environment_variable_overrides: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentEnvironmentVariableOverrideArgs']]]]] = None,
                 environment_variables: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentEnvironmentVariableArgs']]]]] = None,
                 mode: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 project_id: Optional[pulumi.Input[str]] = None,
                 secret_aliases: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentSecretAliasArgs']]]]] = None,
                 secret_overrides: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentSecretOverrideArgs']]]]] = None,
                 secrets: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentSecretArgs']]]]] = 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__ = EnvironmentArgs.__new__(EnvironmentArgs)

            if cluster_id is None and not opts.urn:
                raise TypeError("Missing required property 'cluster_id'")
            __props__.__dict__["cluster_id"] = cluster_id
            __props__.__dict__["environment_variable_aliases"] = environment_variable_aliases
            __props__.__dict__["environment_variable_overrides"] = environment_variable_overrides
            __props__.__dict__["environment_variables"] = environment_variables
            __props__.__dict__["mode"] = mode
            __props__.__dict__["name"] = name
            if project_id is None and not opts.urn:
                raise TypeError("Missing required property 'project_id'")
            __props__.__dict__["project_id"] = project_id
            __props__.__dict__["secret_aliases"] = secret_aliases
            __props__.__dict__["secret_overrides"] = secret_overrides
            __props__.__dict__["secrets"] = secrets
            __props__.__dict__["built_in_environment_variables"] = None
        super(Environment, __self__).__init__(
            'qovery:index/environment:Environment',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            built_in_environment_variables: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentBuiltInEnvironmentVariableArgs']]]]] = None,
            cluster_id: Optional[pulumi.Input[str]] = None,
            environment_variable_aliases: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentEnvironmentVariableAliasArgs']]]]] = None,
            environment_variable_overrides: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentEnvironmentVariableOverrideArgs']]]]] = None,
            environment_variables: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentEnvironmentVariableArgs']]]]] = None,
            mode: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            project_id: Optional[pulumi.Input[str]] = None,
            secret_aliases: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentSecretAliasArgs']]]]] = None,
            secret_overrides: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentSecretOverrideArgs']]]]] = None,
            secrets: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentSecretArgs']]]]] = None) -> 'Environment':
        """
        Get an existing Environment 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[Sequence[pulumi.Input[pulumi.InputType['EnvironmentBuiltInEnvironmentVariableArgs']]]] built_in_environment_variables: List of built-in environment variables linked to this environment.
        :param pulumi.Input[str] cluster_id: Id of the cluster [NOTE: can't be updated after creation].
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentEnvironmentVariableAliasArgs']]]] environment_variable_aliases: List of environment variable aliases linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentEnvironmentVariableOverrideArgs']]]] environment_variable_overrides: List of environment variable overrides linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentEnvironmentVariableArgs']]]] environment_variables: List of environment variables linked to this environment.
        :param pulumi.Input[str] mode: Mode of the environment. - Can be: `DEVELOPMENT`, `PREVIEW`, `PRODUCTION`, `STAGING`. - Default: `DEVELOPMENT`.
        :param pulumi.Input[str] name: Name of the environment.
        :param pulumi.Input[str] project_id: Id of the project.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentSecretAliasArgs']]]] secret_aliases: List of secret aliases linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentSecretOverrideArgs']]]] secret_overrides: List of secret overrides linked to this environment.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EnvironmentSecretArgs']]]] secrets: List of secrets linked to this environment.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _EnvironmentState.__new__(_EnvironmentState)

        __props__.__dict__["built_in_environment_variables"] = built_in_environment_variables
        __props__.__dict__["cluster_id"] = cluster_id
        __props__.__dict__["environment_variable_aliases"] = environment_variable_aliases
        __props__.__dict__["environment_variable_overrides"] = environment_variable_overrides
        __props__.__dict__["environment_variables"] = environment_variables
        __props__.__dict__["mode"] = mode
        __props__.__dict__["name"] = name
        __props__.__dict__["project_id"] = project_id
        __props__.__dict__["secret_aliases"] = secret_aliases
        __props__.__dict__["secret_overrides"] = secret_overrides
        __props__.__dict__["secrets"] = secrets
        return Environment(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="builtInEnvironmentVariables")
    def built_in_environment_variables(self) -> pulumi.Output[Sequence['outputs.EnvironmentBuiltInEnvironmentVariable']]:
        """
        List of built-in environment variables linked to this environment.
        """
        return pulumi.get(self, "built_in_environment_variables")

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> pulumi.Output[str]:
        """
        Id of the cluster [NOTE: can't be updated after creation].
        """
        return pulumi.get(self, "cluster_id")

    @property
    @pulumi.getter(name="environmentVariableAliases")
    def environment_variable_aliases(self) -> pulumi.Output[Optional[Sequence['outputs.EnvironmentEnvironmentVariableAlias']]]:
        """
        List of environment variable aliases linked to this environment.
        """
        return pulumi.get(self, "environment_variable_aliases")

    @property
    @pulumi.getter(name="environmentVariableOverrides")
    def environment_variable_overrides(self) -> pulumi.Output[Optional[Sequence['outputs.EnvironmentEnvironmentVariableOverride']]]:
        """
        List of environment variable overrides linked to this environment.
        """
        return pulumi.get(self, "environment_variable_overrides")

    @property
    @pulumi.getter(name="environmentVariables")
    def environment_variables(self) -> pulumi.Output[Optional[Sequence['outputs.EnvironmentEnvironmentVariable']]]:
        """
        List of environment variables linked to this environment.
        """
        return pulumi.get(self, "environment_variables")

    @property
    @pulumi.getter
    def mode(self) -> pulumi.Output[str]:
        """
        Mode of the environment. - Can be: `DEVELOPMENT`, `PREVIEW`, `PRODUCTION`, `STAGING`. - Default: `DEVELOPMENT`.
        """
        return pulumi.get(self, "mode")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        Name of the environment.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="projectId")
    def project_id(self) -> pulumi.Output[str]:
        """
        Id of the project.
        """
        return pulumi.get(self, "project_id")

    @property
    @pulumi.getter(name="secretAliases")
    def secret_aliases(self) -> pulumi.Output[Optional[Sequence['outputs.EnvironmentSecretAlias']]]:
        """
        List of secret aliases linked to this environment.
        """
        return pulumi.get(self, "secret_aliases")

    @property
    @pulumi.getter(name="secretOverrides")
    def secret_overrides(self) -> pulumi.Output[Optional[Sequence['outputs.EnvironmentSecretOverride']]]:
        """
        List of secret overrides linked to this environment.
        """
        return pulumi.get(self, "secret_overrides")

    @property
    @pulumi.getter
    def secrets(self) -> pulumi.Output[Optional[Sequence['outputs.EnvironmentSecret']]]:
        """
        List of secrets linked to this environment.
        """
        return pulumi.get(self, "secrets")

