# 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__ = ['InstancePoolArgs', 'InstancePool']

@pulumi.input_type
class InstancePoolArgs:
    def __init__(__self__, *,
                 size: pulumi.Input[int],
                 template_id: pulumi.Input[str],
                 zone: pulumi.Input[str],
                 affinity_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 deploy_target_id: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 disk_size: Optional[pulumi.Input[int]] = None,
                 elastic_ip_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 instance_prefix: Optional[pulumi.Input[str]] = None,
                 instance_type: Optional[pulumi.Input[str]] = None,
                 instances: Optional[pulumi.Input[Sequence[pulumi.Input['InstancePoolInstanceArgs']]]] = None,
                 ipv6: Optional[pulumi.Input[bool]] = None,
                 key_pair: Optional[pulumi.Input[str]] = None,
                 labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 network_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 service_offering: Optional[pulumi.Input[str]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 user_data: Optional[pulumi.Input[str]] = None,
                 virtual_machines: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        The set of arguments for constructing a InstancePool resource.
        :param pulumi.Input[int] size: The number of managed instances.
        :param pulumi.Input[str] template_id: The get_compute_template (ID) to use when creating the managed instances.
        :param pulumi.Input[str] zone: The Exoscale [Zone][zone] name.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] affinity_group_ids: A list of AntiAffinityGroup (IDs; may only be set at creation time).
        :param pulumi.Input[str] deploy_target_id: A deploy target ID.
        :param pulumi.Input[str] description: A free-form text describing the pool.
        :param pulumi.Input[int] disk_size: The managed instances disk size (GiB).
        :param pulumi.Input[Sequence[pulumi.Input[str]]] elastic_ip_ids: A list of ElasticIP (IDs).
        :param pulumi.Input[str] instance_prefix: The string used to prefix managed instances name (default: `pool`).
        :param pulumi.Input[str] instance_type: The managed compute instances type (`<family>.<size>`, e.g. `standard.medium`; use the [Exoscale CLI][cli] - `exo compute instance-type list` - for the list of available types).
        :param pulumi.Input[Sequence[pulumi.Input['InstancePoolInstanceArgs']]] instances: The list of managed instances. Structure is documented below.
        :param pulumi.Input[bool] ipv6: Enable IPv6 on managed instances (boolean; default: `false`).
        :param pulumi.Input[str] key_pair: The SSHKey (name) to authorize in the managed instances.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A map of key/value labels.
        :param pulumi.Input[str] name: The instance pool name.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] network_ids: A list of PrivateNetwork (IDs).
        :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A list of SecurityGroup (IDs).
        :param pulumi.Input[str] service_offering: The managed instances type. Please use the `instance_type` argument instead.
        :param pulumi.Input[str] user_data: [cloud-init][cloud-init] configuration to apply to the managed instances (no need to base64-encode or gzip it as the provider will take care of it).
        :param pulumi.Input[Sequence[pulumi.Input[str]]] virtual_machines: (Deprecated) The list of managed instances (IDs). Please use the `instances.*.id` attribute instead.
        """
        pulumi.set(__self__, "size", size)
        pulumi.set(__self__, "template_id", template_id)
        pulumi.set(__self__, "zone", zone)
        if affinity_group_ids is not None:
            pulumi.set(__self__, "affinity_group_ids", affinity_group_ids)
        if deploy_target_id is not None:
            pulumi.set(__self__, "deploy_target_id", deploy_target_id)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if disk_size is not None:
            pulumi.set(__self__, "disk_size", disk_size)
        if elastic_ip_ids is not None:
            pulumi.set(__self__, "elastic_ip_ids", elastic_ip_ids)
        if instance_prefix is not None:
            pulumi.set(__self__, "instance_prefix", instance_prefix)
        if instance_type is not None:
            pulumi.set(__self__, "instance_type", instance_type)
        if instances is not None:
            pulumi.set(__self__, "instances", instances)
        if ipv6 is not None:
            pulumi.set(__self__, "ipv6", ipv6)
        if key_pair is not None:
            pulumi.set(__self__, "key_pair", key_pair)
        if labels is not None:
            pulumi.set(__self__, "labels", labels)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if network_ids is not None:
            pulumi.set(__self__, "network_ids", network_ids)
        if security_group_ids is not None:
            pulumi.set(__self__, "security_group_ids", security_group_ids)
        if service_offering is not None:
            warnings.warn("""This attribute has been replaced by \"instance_type\".""", DeprecationWarning)
            pulumi.log.warn("""service_offering is deprecated: This attribute has been replaced by \"instance_type\".""")
        if service_offering is not None:
            pulumi.set(__self__, "service_offering", service_offering)
        if state is not None:
            pulumi.set(__self__, "state", state)
        if user_data is not None:
            pulumi.set(__self__, "user_data", user_data)
        if virtual_machines is not None:
            warnings.warn("""Use the instances exported attribute instead.""", DeprecationWarning)
            pulumi.log.warn("""virtual_machines is deprecated: Use the instances exported attribute instead.""")
        if virtual_machines is not None:
            pulumi.set(__self__, "virtual_machines", virtual_machines)

    @property
    @pulumi.getter
    def size(self) -> pulumi.Input[int]:
        """
        The number of managed instances.
        """
        return pulumi.get(self, "size")

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

    @property
    @pulumi.getter(name="templateId")
    def template_id(self) -> pulumi.Input[str]:
        """
        The get_compute_template (ID) to use when creating the managed instances.
        """
        return pulumi.get(self, "template_id")

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

    @property
    @pulumi.getter
    def zone(self) -> pulumi.Input[str]:
        """
        The Exoscale [Zone][zone] name.
        """
        return pulumi.get(self, "zone")

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

    @property
    @pulumi.getter(name="affinityGroupIds")
    def affinity_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of AntiAffinityGroup (IDs; may only be set at creation time).
        """
        return pulumi.get(self, "affinity_group_ids")

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

    @property
    @pulumi.getter(name="deployTargetId")
    def deploy_target_id(self) -> Optional[pulumi.Input[str]]:
        """
        A deploy target ID.
        """
        return pulumi.get(self, "deploy_target_id")

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

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        A free-form text describing the pool.
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter(name="diskSize")
    def disk_size(self) -> Optional[pulumi.Input[int]]:
        """
        The managed instances disk size (GiB).
        """
        return pulumi.get(self, "disk_size")

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

    @property
    @pulumi.getter(name="elasticIpIds")
    def elastic_ip_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of ElasticIP (IDs).
        """
        return pulumi.get(self, "elastic_ip_ids")

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

    @property
    @pulumi.getter(name="instancePrefix")
    def instance_prefix(self) -> Optional[pulumi.Input[str]]:
        """
        The string used to prefix managed instances name (default: `pool`).
        """
        return pulumi.get(self, "instance_prefix")

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

    @property
    @pulumi.getter(name="instanceType")
    def instance_type(self) -> Optional[pulumi.Input[str]]:
        """
        The managed compute instances type (`<family>.<size>`, e.g. `standard.medium`; use the [Exoscale CLI][cli] - `exo compute instance-type list` - for the list of available types).
        """
        return pulumi.get(self, "instance_type")

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

    @property
    @pulumi.getter
    def instances(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['InstancePoolInstanceArgs']]]]:
        """
        The list of managed instances. Structure is documented below.
        """
        return pulumi.get(self, "instances")

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

    @property
    @pulumi.getter
    def ipv6(self) -> Optional[pulumi.Input[bool]]:
        """
        Enable IPv6 on managed instances (boolean; default: `false`).
        """
        return pulumi.get(self, "ipv6")

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

    @property
    @pulumi.getter(name="keyPair")
    def key_pair(self) -> Optional[pulumi.Input[str]]:
        """
        The SSHKey (name) to authorize in the managed instances.
        """
        return pulumi.get(self, "key_pair")

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

    @property
    @pulumi.getter
    def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        """
        A map of key/value labels.
        """
        return pulumi.get(self, "labels")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The instance pool name.
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter(name="networkIds")
    def network_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of PrivateNetwork (IDs).
        """
        return pulumi.get(self, "network_ids")

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

    @property
    @pulumi.getter(name="securityGroupIds")
    def security_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of SecurityGroup (IDs).
        """
        return pulumi.get(self, "security_group_ids")

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

    @property
    @pulumi.getter(name="serviceOffering")
    def service_offering(self) -> Optional[pulumi.Input[str]]:
        """
        The managed instances type. Please use the `instance_type` argument instead.
        """
        return pulumi.get(self, "service_offering")

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

    @property
    @pulumi.getter
    def state(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "state")

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

    @property
    @pulumi.getter(name="userData")
    def user_data(self) -> Optional[pulumi.Input[str]]:
        """
        [cloud-init][cloud-init] configuration to apply to the managed instances (no need to base64-encode or gzip it as the provider will take care of it).
        """
        return pulumi.get(self, "user_data")

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

    @property
    @pulumi.getter(name="virtualMachines")
    def virtual_machines(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        (Deprecated) The list of managed instances (IDs). Please use the `instances.*.id` attribute instead.
        """
        return pulumi.get(self, "virtual_machines")

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


@pulumi.input_type
class _InstancePoolState:
    def __init__(__self__, *,
                 affinity_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 deploy_target_id: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 disk_size: Optional[pulumi.Input[int]] = None,
                 elastic_ip_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 instance_prefix: Optional[pulumi.Input[str]] = None,
                 instance_type: Optional[pulumi.Input[str]] = None,
                 instances: Optional[pulumi.Input[Sequence[pulumi.Input['InstancePoolInstanceArgs']]]] = None,
                 ipv6: Optional[pulumi.Input[bool]] = None,
                 key_pair: Optional[pulumi.Input[str]] = None,
                 labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 network_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 service_offering: Optional[pulumi.Input[str]] = None,
                 size: Optional[pulumi.Input[int]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 template_id: Optional[pulumi.Input[str]] = None,
                 user_data: Optional[pulumi.Input[str]] = None,
                 virtual_machines: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 zone: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering InstancePool resources.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] affinity_group_ids: A list of AntiAffinityGroup (IDs; may only be set at creation time).
        :param pulumi.Input[str] deploy_target_id: A deploy target ID.
        :param pulumi.Input[str] description: A free-form text describing the pool.
        :param pulumi.Input[int] disk_size: The managed instances disk size (GiB).
        :param pulumi.Input[Sequence[pulumi.Input[str]]] elastic_ip_ids: A list of ElasticIP (IDs).
        :param pulumi.Input[str] instance_prefix: The string used to prefix managed instances name (default: `pool`).
        :param pulumi.Input[str] instance_type: The managed compute instances type (`<family>.<size>`, e.g. `standard.medium`; use the [Exoscale CLI][cli] - `exo compute instance-type list` - for the list of available types).
        :param pulumi.Input[Sequence[pulumi.Input['InstancePoolInstanceArgs']]] instances: The list of managed instances. Structure is documented below.
        :param pulumi.Input[bool] ipv6: Enable IPv6 on managed instances (boolean; default: `false`).
        :param pulumi.Input[str] key_pair: The SSHKey (name) to authorize in the managed instances.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A map of key/value labels.
        :param pulumi.Input[str] name: The instance pool name.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] network_ids: A list of PrivateNetwork (IDs).
        :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A list of SecurityGroup (IDs).
        :param pulumi.Input[str] service_offering: The managed instances type. Please use the `instance_type` argument instead.
        :param pulumi.Input[int] size: The number of managed instances.
        :param pulumi.Input[str] template_id: The get_compute_template (ID) to use when creating the managed instances.
        :param pulumi.Input[str] user_data: [cloud-init][cloud-init] configuration to apply to the managed instances (no need to base64-encode or gzip it as the provider will take care of it).
        :param pulumi.Input[Sequence[pulumi.Input[str]]] virtual_machines: (Deprecated) The list of managed instances (IDs). Please use the `instances.*.id` attribute instead.
        :param pulumi.Input[str] zone: The Exoscale [Zone][zone] name.
        """
        if affinity_group_ids is not None:
            pulumi.set(__self__, "affinity_group_ids", affinity_group_ids)
        if deploy_target_id is not None:
            pulumi.set(__self__, "deploy_target_id", deploy_target_id)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if disk_size is not None:
            pulumi.set(__self__, "disk_size", disk_size)
        if elastic_ip_ids is not None:
            pulumi.set(__self__, "elastic_ip_ids", elastic_ip_ids)
        if instance_prefix is not None:
            pulumi.set(__self__, "instance_prefix", instance_prefix)
        if instance_type is not None:
            pulumi.set(__self__, "instance_type", instance_type)
        if instances is not None:
            pulumi.set(__self__, "instances", instances)
        if ipv6 is not None:
            pulumi.set(__self__, "ipv6", ipv6)
        if key_pair is not None:
            pulumi.set(__self__, "key_pair", key_pair)
        if labels is not None:
            pulumi.set(__self__, "labels", labels)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if network_ids is not None:
            pulumi.set(__self__, "network_ids", network_ids)
        if security_group_ids is not None:
            pulumi.set(__self__, "security_group_ids", security_group_ids)
        if service_offering is not None:
            warnings.warn("""This attribute has been replaced by \"instance_type\".""", DeprecationWarning)
            pulumi.log.warn("""service_offering is deprecated: This attribute has been replaced by \"instance_type\".""")
        if service_offering is not None:
            pulumi.set(__self__, "service_offering", service_offering)
        if size is not None:
            pulumi.set(__self__, "size", size)
        if state is not None:
            pulumi.set(__self__, "state", state)
        if template_id is not None:
            pulumi.set(__self__, "template_id", template_id)
        if user_data is not None:
            pulumi.set(__self__, "user_data", user_data)
        if virtual_machines is not None:
            warnings.warn("""Use the instances exported attribute instead.""", DeprecationWarning)
            pulumi.log.warn("""virtual_machines is deprecated: Use the instances exported attribute instead.""")
        if virtual_machines is not None:
            pulumi.set(__self__, "virtual_machines", virtual_machines)
        if zone is not None:
            pulumi.set(__self__, "zone", zone)

    @property
    @pulumi.getter(name="affinityGroupIds")
    def affinity_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of AntiAffinityGroup (IDs; may only be set at creation time).
        """
        return pulumi.get(self, "affinity_group_ids")

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

    @property
    @pulumi.getter(name="deployTargetId")
    def deploy_target_id(self) -> Optional[pulumi.Input[str]]:
        """
        A deploy target ID.
        """
        return pulumi.get(self, "deploy_target_id")

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

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        A free-form text describing the pool.
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter(name="diskSize")
    def disk_size(self) -> Optional[pulumi.Input[int]]:
        """
        The managed instances disk size (GiB).
        """
        return pulumi.get(self, "disk_size")

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

    @property
    @pulumi.getter(name="elasticIpIds")
    def elastic_ip_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of ElasticIP (IDs).
        """
        return pulumi.get(self, "elastic_ip_ids")

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

    @property
    @pulumi.getter(name="instancePrefix")
    def instance_prefix(self) -> Optional[pulumi.Input[str]]:
        """
        The string used to prefix managed instances name (default: `pool`).
        """
        return pulumi.get(self, "instance_prefix")

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

    @property
    @pulumi.getter(name="instanceType")
    def instance_type(self) -> Optional[pulumi.Input[str]]:
        """
        The managed compute instances type (`<family>.<size>`, e.g. `standard.medium`; use the [Exoscale CLI][cli] - `exo compute instance-type list` - for the list of available types).
        """
        return pulumi.get(self, "instance_type")

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

    @property
    @pulumi.getter
    def instances(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['InstancePoolInstanceArgs']]]]:
        """
        The list of managed instances. Structure is documented below.
        """
        return pulumi.get(self, "instances")

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

    @property
    @pulumi.getter
    def ipv6(self) -> Optional[pulumi.Input[bool]]:
        """
        Enable IPv6 on managed instances (boolean; default: `false`).
        """
        return pulumi.get(self, "ipv6")

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

    @property
    @pulumi.getter(name="keyPair")
    def key_pair(self) -> Optional[pulumi.Input[str]]:
        """
        The SSHKey (name) to authorize in the managed instances.
        """
        return pulumi.get(self, "key_pair")

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

    @property
    @pulumi.getter
    def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        """
        A map of key/value labels.
        """
        return pulumi.get(self, "labels")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The instance pool name.
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter(name="networkIds")
    def network_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of PrivateNetwork (IDs).
        """
        return pulumi.get(self, "network_ids")

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

    @property
    @pulumi.getter(name="securityGroupIds")
    def security_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of SecurityGroup (IDs).
        """
        return pulumi.get(self, "security_group_ids")

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

    @property
    @pulumi.getter(name="serviceOffering")
    def service_offering(self) -> Optional[pulumi.Input[str]]:
        """
        The managed instances type. Please use the `instance_type` argument instead.
        """
        return pulumi.get(self, "service_offering")

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

    @property
    @pulumi.getter
    def size(self) -> Optional[pulumi.Input[int]]:
        """
        The number of managed instances.
        """
        return pulumi.get(self, "size")

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

    @property
    @pulumi.getter
    def state(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "state")

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

    @property
    @pulumi.getter(name="templateId")
    def template_id(self) -> Optional[pulumi.Input[str]]:
        """
        The get_compute_template (ID) to use when creating the managed instances.
        """
        return pulumi.get(self, "template_id")

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

    @property
    @pulumi.getter(name="userData")
    def user_data(self) -> Optional[pulumi.Input[str]]:
        """
        [cloud-init][cloud-init] configuration to apply to the managed instances (no need to base64-encode or gzip it as the provider will take care of it).
        """
        return pulumi.get(self, "user_data")

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

    @property
    @pulumi.getter(name="virtualMachines")
    def virtual_machines(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        (Deprecated) The list of managed instances (IDs). Please use the `instances.*.id` attribute instead.
        """
        return pulumi.get(self, "virtual_machines")

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

    @property
    @pulumi.getter
    def zone(self) -> Optional[pulumi.Input[str]]:
        """
        The Exoscale [Zone][zone] name.
        """
        return pulumi.get(self, "zone")

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


class InstancePool(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 affinity_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 deploy_target_id: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 disk_size: Optional[pulumi.Input[int]] = None,
                 elastic_ip_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 instance_prefix: Optional[pulumi.Input[str]] = None,
                 instance_type: Optional[pulumi.Input[str]] = None,
                 instances: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InstancePoolInstanceArgs']]]]] = None,
                 ipv6: Optional[pulumi.Input[bool]] = None,
                 key_pair: Optional[pulumi.Input[str]] = None,
                 labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 network_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 service_offering: Optional[pulumi.Input[str]] = None,
                 size: Optional[pulumi.Input[int]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 template_id: Optional[pulumi.Input[str]] = None,
                 user_data: Optional[pulumi.Input[str]] = None,
                 virtual_machines: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 zone: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        ## Import

        An existing instance pool may be imported by `<ID>@<zone>`console

        ```sh
         $ pulumi import exoscale:index/instancePool:InstancePool \\
        ```

         exoscale_instance_pool.my_instance_pool \\

         f81d4fae-7dec-11d0-a765-00a0c91e6bf6@ch-gva-2

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] affinity_group_ids: A list of AntiAffinityGroup (IDs; may only be set at creation time).
        :param pulumi.Input[str] deploy_target_id: A deploy target ID.
        :param pulumi.Input[str] description: A free-form text describing the pool.
        :param pulumi.Input[int] disk_size: The managed instances disk size (GiB).
        :param pulumi.Input[Sequence[pulumi.Input[str]]] elastic_ip_ids: A list of ElasticIP (IDs).
        :param pulumi.Input[str] instance_prefix: The string used to prefix managed instances name (default: `pool`).
        :param pulumi.Input[str] instance_type: The managed compute instances type (`<family>.<size>`, e.g. `standard.medium`; use the [Exoscale CLI][cli] - `exo compute instance-type list` - for the list of available types).
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InstancePoolInstanceArgs']]]] instances: The list of managed instances. Structure is documented below.
        :param pulumi.Input[bool] ipv6: Enable IPv6 on managed instances (boolean; default: `false`).
        :param pulumi.Input[str] key_pair: The SSHKey (name) to authorize in the managed instances.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A map of key/value labels.
        :param pulumi.Input[str] name: The instance pool name.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] network_ids: A list of PrivateNetwork (IDs).
        :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A list of SecurityGroup (IDs).
        :param pulumi.Input[str] service_offering: The managed instances type. Please use the `instance_type` argument instead.
        :param pulumi.Input[int] size: The number of managed instances.
        :param pulumi.Input[str] template_id: The get_compute_template (ID) to use when creating the managed instances.
        :param pulumi.Input[str] user_data: [cloud-init][cloud-init] configuration to apply to the managed instances (no need to base64-encode or gzip it as the provider will take care of it).
        :param pulumi.Input[Sequence[pulumi.Input[str]]] virtual_machines: (Deprecated) The list of managed instances (IDs). Please use the `instances.*.id` attribute instead.
        :param pulumi.Input[str] zone: The Exoscale [Zone][zone] name.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: InstancePoolArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        ## Import

        An existing instance pool may be imported by `<ID>@<zone>`console

        ```sh
         $ pulumi import exoscale:index/instancePool:InstancePool \\
        ```

         exoscale_instance_pool.my_instance_pool \\

         f81d4fae-7dec-11d0-a765-00a0c91e6bf6@ch-gva-2

        :param str resource_name: The name of the resource.
        :param InstancePoolArgs 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(InstancePoolArgs, 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,
                 affinity_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 deploy_target_id: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 disk_size: Optional[pulumi.Input[int]] = None,
                 elastic_ip_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 instance_prefix: Optional[pulumi.Input[str]] = None,
                 instance_type: Optional[pulumi.Input[str]] = None,
                 instances: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InstancePoolInstanceArgs']]]]] = None,
                 ipv6: Optional[pulumi.Input[bool]] = None,
                 key_pair: Optional[pulumi.Input[str]] = None,
                 labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 network_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 service_offering: Optional[pulumi.Input[str]] = None,
                 size: Optional[pulumi.Input[int]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 template_id: Optional[pulumi.Input[str]] = None,
                 user_data: Optional[pulumi.Input[str]] = None,
                 virtual_machines: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 zone: Optional[pulumi.Input[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__ = InstancePoolArgs.__new__(InstancePoolArgs)

            __props__.__dict__["affinity_group_ids"] = affinity_group_ids
            __props__.__dict__["deploy_target_id"] = deploy_target_id
            __props__.__dict__["description"] = description
            __props__.__dict__["disk_size"] = disk_size
            __props__.__dict__["elastic_ip_ids"] = elastic_ip_ids
            __props__.__dict__["instance_prefix"] = instance_prefix
            __props__.__dict__["instance_type"] = instance_type
            __props__.__dict__["instances"] = instances
            __props__.__dict__["ipv6"] = ipv6
            __props__.__dict__["key_pair"] = key_pair
            __props__.__dict__["labels"] = labels
            __props__.__dict__["name"] = name
            __props__.__dict__["network_ids"] = network_ids
            __props__.__dict__["security_group_ids"] = security_group_ids
            if service_offering is not None and not opts.urn:
                warnings.warn("""This attribute has been replaced by \"instance_type\".""", DeprecationWarning)
                pulumi.log.warn("""service_offering is deprecated: This attribute has been replaced by \"instance_type\".""")
            __props__.__dict__["service_offering"] = service_offering
            if size is None and not opts.urn:
                raise TypeError("Missing required property 'size'")
            __props__.__dict__["size"] = size
            __props__.__dict__["state"] = state
            if template_id is None and not opts.urn:
                raise TypeError("Missing required property 'template_id'")
            __props__.__dict__["template_id"] = template_id
            __props__.__dict__["user_data"] = user_data
            if virtual_machines is not None and not opts.urn:
                warnings.warn("""Use the instances exported attribute instead.""", DeprecationWarning)
                pulumi.log.warn("""virtual_machines is deprecated: Use the instances exported attribute instead.""")
            __props__.__dict__["virtual_machines"] = virtual_machines
            if zone is None and not opts.urn:
                raise TypeError("Missing required property 'zone'")
            __props__.__dict__["zone"] = zone
        super(InstancePool, __self__).__init__(
            'exoscale:index/instancePool:InstancePool',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            affinity_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            deploy_target_id: Optional[pulumi.Input[str]] = None,
            description: Optional[pulumi.Input[str]] = None,
            disk_size: Optional[pulumi.Input[int]] = None,
            elastic_ip_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            instance_prefix: Optional[pulumi.Input[str]] = None,
            instance_type: Optional[pulumi.Input[str]] = None,
            instances: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InstancePoolInstanceArgs']]]]] = None,
            ipv6: Optional[pulumi.Input[bool]] = None,
            key_pair: Optional[pulumi.Input[str]] = None,
            labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            name: Optional[pulumi.Input[str]] = None,
            network_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            service_offering: Optional[pulumi.Input[str]] = None,
            size: Optional[pulumi.Input[int]] = None,
            state: Optional[pulumi.Input[str]] = None,
            template_id: Optional[pulumi.Input[str]] = None,
            user_data: Optional[pulumi.Input[str]] = None,
            virtual_machines: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            zone: Optional[pulumi.Input[str]] = None) -> 'InstancePool':
        """
        Get an existing InstancePool 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[str]]] affinity_group_ids: A list of AntiAffinityGroup (IDs; may only be set at creation time).
        :param pulumi.Input[str] deploy_target_id: A deploy target ID.
        :param pulumi.Input[str] description: A free-form text describing the pool.
        :param pulumi.Input[int] disk_size: The managed instances disk size (GiB).
        :param pulumi.Input[Sequence[pulumi.Input[str]]] elastic_ip_ids: A list of ElasticIP (IDs).
        :param pulumi.Input[str] instance_prefix: The string used to prefix managed instances name (default: `pool`).
        :param pulumi.Input[str] instance_type: The managed compute instances type (`<family>.<size>`, e.g. `standard.medium`; use the [Exoscale CLI][cli] - `exo compute instance-type list` - for the list of available types).
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InstancePoolInstanceArgs']]]] instances: The list of managed instances. Structure is documented below.
        :param pulumi.Input[bool] ipv6: Enable IPv6 on managed instances (boolean; default: `false`).
        :param pulumi.Input[str] key_pair: The SSHKey (name) to authorize in the managed instances.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A map of key/value labels.
        :param pulumi.Input[str] name: The instance pool name.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] network_ids: A list of PrivateNetwork (IDs).
        :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A list of SecurityGroup (IDs).
        :param pulumi.Input[str] service_offering: The managed instances type. Please use the `instance_type` argument instead.
        :param pulumi.Input[int] size: The number of managed instances.
        :param pulumi.Input[str] template_id: The get_compute_template (ID) to use when creating the managed instances.
        :param pulumi.Input[str] user_data: [cloud-init][cloud-init] configuration to apply to the managed instances (no need to base64-encode or gzip it as the provider will take care of it).
        :param pulumi.Input[Sequence[pulumi.Input[str]]] virtual_machines: (Deprecated) The list of managed instances (IDs). Please use the `instances.*.id` attribute instead.
        :param pulumi.Input[str] zone: The Exoscale [Zone][zone] name.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _InstancePoolState.__new__(_InstancePoolState)

        __props__.__dict__["affinity_group_ids"] = affinity_group_ids
        __props__.__dict__["deploy_target_id"] = deploy_target_id
        __props__.__dict__["description"] = description
        __props__.__dict__["disk_size"] = disk_size
        __props__.__dict__["elastic_ip_ids"] = elastic_ip_ids
        __props__.__dict__["instance_prefix"] = instance_prefix
        __props__.__dict__["instance_type"] = instance_type
        __props__.__dict__["instances"] = instances
        __props__.__dict__["ipv6"] = ipv6
        __props__.__dict__["key_pair"] = key_pair
        __props__.__dict__["labels"] = labels
        __props__.__dict__["name"] = name
        __props__.__dict__["network_ids"] = network_ids
        __props__.__dict__["security_group_ids"] = security_group_ids
        __props__.__dict__["service_offering"] = service_offering
        __props__.__dict__["size"] = size
        __props__.__dict__["state"] = state
        __props__.__dict__["template_id"] = template_id
        __props__.__dict__["user_data"] = user_data
        __props__.__dict__["virtual_machines"] = virtual_machines
        __props__.__dict__["zone"] = zone
        return InstancePool(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="affinityGroupIds")
    def affinity_group_ids(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        A list of AntiAffinityGroup (IDs; may only be set at creation time).
        """
        return pulumi.get(self, "affinity_group_ids")

    @property
    @pulumi.getter(name="deployTargetId")
    def deploy_target_id(self) -> pulumi.Output[Optional[str]]:
        """
        A deploy target ID.
        """
        return pulumi.get(self, "deploy_target_id")

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[Optional[str]]:
        """
        A free-form text describing the pool.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="diskSize")
    def disk_size(self) -> pulumi.Output[int]:
        """
        The managed instances disk size (GiB).
        """
        return pulumi.get(self, "disk_size")

    @property
    @pulumi.getter(name="elasticIpIds")
    def elastic_ip_ids(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        A list of ElasticIP (IDs).
        """
        return pulumi.get(self, "elastic_ip_ids")

    @property
    @pulumi.getter(name="instancePrefix")
    def instance_prefix(self) -> pulumi.Output[Optional[str]]:
        """
        The string used to prefix managed instances name (default: `pool`).
        """
        return pulumi.get(self, "instance_prefix")

    @property
    @pulumi.getter(name="instanceType")
    def instance_type(self) -> pulumi.Output[str]:
        """
        The managed compute instances type (`<family>.<size>`, e.g. `standard.medium`; use the [Exoscale CLI][cli] - `exo compute instance-type list` - for the list of available types).
        """
        return pulumi.get(self, "instance_type")

    @property
    @pulumi.getter
    def instances(self) -> pulumi.Output[Sequence['outputs.InstancePoolInstance']]:
        """
        The list of managed instances. Structure is documented below.
        """
        return pulumi.get(self, "instances")

    @property
    @pulumi.getter
    def ipv6(self) -> pulumi.Output[Optional[bool]]:
        """
        Enable IPv6 on managed instances (boolean; default: `false`).
        """
        return pulumi.get(self, "ipv6")

    @property
    @pulumi.getter(name="keyPair")
    def key_pair(self) -> pulumi.Output[Optional[str]]:
        """
        The SSHKey (name) to authorize in the managed instances.
        """
        return pulumi.get(self, "key_pair")

    @property
    @pulumi.getter
    def labels(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
        """
        A map of key/value labels.
        """
        return pulumi.get(self, "labels")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        The instance pool name.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="networkIds")
    def network_ids(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        A list of PrivateNetwork (IDs).
        """
        return pulumi.get(self, "network_ids")

    @property
    @pulumi.getter(name="securityGroupIds")
    def security_group_ids(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        A list of SecurityGroup (IDs).
        """
        return pulumi.get(self, "security_group_ids")

    @property
    @pulumi.getter(name="serviceOffering")
    def service_offering(self) -> pulumi.Output[str]:
        """
        The managed instances type. Please use the `instance_type` argument instead.
        """
        return pulumi.get(self, "service_offering")

    @property
    @pulumi.getter
    def size(self) -> pulumi.Output[int]:
        """
        The number of managed instances.
        """
        return pulumi.get(self, "size")

    @property
    @pulumi.getter
    def state(self) -> pulumi.Output[str]:
        return pulumi.get(self, "state")

    @property
    @pulumi.getter(name="templateId")
    def template_id(self) -> pulumi.Output[str]:
        """
        The get_compute_template (ID) to use when creating the managed instances.
        """
        return pulumi.get(self, "template_id")

    @property
    @pulumi.getter(name="userData")
    def user_data(self) -> pulumi.Output[Optional[str]]:
        """
        [cloud-init][cloud-init] configuration to apply to the managed instances (no need to base64-encode or gzip it as the provider will take care of it).
        """
        return pulumi.get(self, "user_data")

    @property
    @pulumi.getter(name="virtualMachines")
    def virtual_machines(self) -> pulumi.Output[Sequence[str]]:
        """
        (Deprecated) The list of managed instances (IDs). Please use the `instances.*.id` attribute instead.
        """
        return pulumi.get(self, "virtual_machines")

    @property
    @pulumi.getter
    def zone(self) -> pulumi.Output[str]:
        """
        The Exoscale [Zone][zone] name.
        """
        return pulumi.get(self, "zone")

