This page documents the language specification for the spotinst package. If you're looking for help working with the inputs, outputs, or functions of spotinst resources in a Pulumi program, please see the resource documentation for examples and API reference.

gke

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-spotinst repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-spotinst repo.

class pulumi_spotinst.gke.Elastigroup(resource_name, opts=None, backend_services=None, cluster_id=None, cluster_zone_name=None, desired_capacity=None, disks=None, draining_timeout=None, fallback_to_ondemand=None, gpu=None, instance_types_customs=None, instance_types_ondemand=None, instance_types_preemptibles=None, integration_docker_swarm=None, integration_gke=None, ip_forwarding=None, labels=None, max_size=None, metadatas=None, min_size=None, name=None, network_interfaces=None, node_image=None, ondemand_count=None, preemptible_percentage=None, scaling_down_policies=None, scaling_up_policies=None, service_account=None, shutdown_script=None, startup_script=None, tags=None, __props__=None, __name__=None, __opts__=None)

Provides a Spotinst Elastigroup GKE resource. Please see Importing a GKE cluster for detailed information.

import pulumi
import pulumi_spotinst as spotinst

example_gke_elastigroup = spotinst.gke.Elastigroup("example-gke-elastigroup",
    backend_services=[{
        "locationType": "global",
        "namedPorts": [{
            "name": "http",
            "ports": [
                80,
                8080,
            ],
        }],
        "serviceName": "backend-service",
    }],
    cluster_zone_name="us-central1-a",
    desired_capacity=3,
    instance_types_ondemand="n1-standard-1",
    instance_types_preemptibles=[
        "n1-standard-1",
        "n1-standard-2",
    ],
    integration_gke={
        "autoscaleCooldown": 300,
        "autoscaleDown": {
            "evaluationPeriods": 300,
        },
        "autoscaleHeadroom": {
            "cpuPerUnit": 1024,
            "memoryPerUnit": 512,
            "numOfUnits": 2,
        },
        "autoscaleIsAutoConfig": False,
        "autoscaleIsEnabled": True,
        "autoscaleLabels": [{
            "key": "label_key",
            "value": "label_value",
        }],
        "cluster_id": "example-cluster-id",
        "location": "us-central1-a",
    },
    max_size=5,
    min_size=1,
    node_image="COS",
    preemptible_percentage=100)
  • integration_gke - (Required) Describes the GKE integration.

    • location - (Optional) The location of your GKE cluster.

    • cluster_id - (Optional) The GKE cluster ID you wish to import.

    • autoscale_is_enabled - (Optional, Default: false) Specifies whether the auto scaling feature is enabled.

    • autoscale_is_autoconfig - (Optional, Default: false) Enabling the automatic auto-scaler functionality. For more information please see: .

    • autoscale_cooldown - (Optional, Default: 300) The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.

    • autoscale_headroom - (Optional) Headroom for the cluster.

      • cpu_per_unit - (Optional, Default: 0) Cpu units for compute.

      • memory_per_unit - (Optional, Default: 0) RAM units for compute.

      • num_of_units - (Optional, Default: 0) Amount of units for compute.

    • autoscale_down - (Optional) Enabling scale down.

      • evaluation_periods - (Optional, Default: 5) Amount of cooldown evaluation periods for scale down.

    • autoscale_labels - (Optional) Labels to assign to the resource.

      • key - (Optional) The label name.

      • value - (Optional) The label value.

Usage:

import pulumi

The following parameters are created remotely and imported. The diffs have been suppressed in order to maintain plan legibility. You may update the values of these imported parameters by defining them in your template with your desired new value (including null values).

  • backend_services

    • service_name

    • location_type

    • scheme

    • named_port

      • port_name

      • ports

  • labels

    • key

    • value

  • metadata

    • key

    • value

  • tags

    • key

    • value

  • service_account

  • ip_forwarding

  • fallback_to_od

  • subnets

    • region

    • subnet_name

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cluster_id (pulumi.Input[str]) – The name of the GKE cluster you wish to import.

  • cluster_zone_name (pulumi.Input[str]) – The zone where the cluster is hosted.

  • node_image (pulumi.Input[str]) – The image that will be used for the node VMs. Possible values: COS, UBUNTU.

The backend_services object supports the following:

  • locationType (pulumi.Input[str])

  • namedPorts (pulumi.Input[list])

    • name (pulumi.Input[str])

    • ports (pulumi.Input[list])

  • scheme (pulumi.Input[str])

  • serviceName (pulumi.Input[str])

The disks object supports the following:

  • autoDelete (pulumi.Input[bool])

  • boot (pulumi.Input[bool])

  • deviceName (pulumi.Input[str])

  • initializeParams (pulumi.Input[list])

    • diskSizeGb (pulumi.Input[str])

    • diskType (pulumi.Input[str])

    • source_image (pulumi.Input[str])

  • interface (pulumi.Input[str])

  • mode (pulumi.Input[str])

  • source (pulumi.Input[str])

  • type (pulumi.Input[str])

The gpu object supports the following:

  • count (pulumi.Input[float])

  • type (pulumi.Input[str])

The instance_types_customs object supports the following:

  • memoryGib (pulumi.Input[float])

  • vcpu (pulumi.Input[float])

The integration_docker_swarm object supports the following:

  • masterHost (pulumi.Input[str])

  • masterPort (pulumi.Input[float])

The integration_gke object supports the following:

  • autoUpdate (pulumi.Input[bool])

  • autoscaleCooldown (pulumi.Input[float])

  • autoscaleDown (pulumi.Input[dict])

    • evaluationPeriods (pulumi.Input[float])

  • autoscaleHeadroom (pulumi.Input[dict])

    • cpuPerUnit (pulumi.Input[float])

    • memoryPerUnit (pulumi.Input[float])

    • numOfUnits (pulumi.Input[float])

  • autoscaleIsAutoConfig (pulumi.Input[bool])

  • autoscaleIsEnabled (pulumi.Input[bool])

  • autoscaleLabels (pulumi.Input[list])

    • key (pulumi.Input[str])

    • value (pulumi.Input[str])

  • cluster_id (pulumi.Input[str]) - The name of the GKE cluster you wish to import.

  • location (pulumi.Input[str])

The labels object supports the following:

  • key (pulumi.Input[str])

  • value (pulumi.Input[str])

The metadatas object supports the following:

  • key (pulumi.Input[str])

  • value (pulumi.Input[str])

The network_interfaces object supports the following:

  • accessConfigs (pulumi.Input[list])

    • name (pulumi.Input[str])

    • type (pulumi.Input[str])

  • aliasIpRanges (pulumi.Input[list])

    • ipCidrRange (pulumi.Input[str])

    • subnetworkRangeName (pulumi.Input[str])

  • network (pulumi.Input[str])

The scaling_down_policies object supports the following:

  • actionType (pulumi.Input[str])

  • adjustment (pulumi.Input[float])

  • cooldown (pulumi.Input[float])

  • dimensions (pulumi.Input[list])

    • name (pulumi.Input[str])

    • value (pulumi.Input[str])

  • evaluationPeriods (pulumi.Input[float])

  • metricName (pulumi.Input[str])

  • namespace (pulumi.Input[str])

  • operator (pulumi.Input[str])

  • period (pulumi.Input[float])

  • policyName (pulumi.Input[str])

  • source (pulumi.Input[str])

  • statistic (pulumi.Input[str])

  • threshold (pulumi.Input[float])

  • unit (pulumi.Input[str])

The scaling_up_policies object supports the following:

  • actionType (pulumi.Input[str])

  • adjustment (pulumi.Input[float])

  • cooldown (pulumi.Input[float])

  • dimensions (pulumi.Input[list])

    • name (pulumi.Input[str])

    • value (pulumi.Input[str])

  • evaluationPeriods (pulumi.Input[float])

  • metricName (pulumi.Input[str])

  • namespace (pulumi.Input[str])

  • operator (pulumi.Input[str])

  • period (pulumi.Input[float])

  • policyName (pulumi.Input[str])

  • source (pulumi.Input[str])

  • statistic (pulumi.Input[str])

  • threshold (pulumi.Input[float])

  • unit (pulumi.Input[str])

cluster_id: pulumi.Output[str] = None

The name of the GKE cluster you wish to import.

cluster_zone_name: pulumi.Output[str] = None

The zone where the cluster is hosted.

node_image: pulumi.Output[str] = None

The image that will be used for the node VMs. Possible values: COS, UBUNTU.

static get(resource_name, id, opts=None, backend_services=None, cluster_id=None, cluster_zone_name=None, desired_capacity=None, disks=None, draining_timeout=None, fallback_to_ondemand=None, gpu=None, instance_types_customs=None, instance_types_ondemand=None, instance_types_preemptibles=None, integration_docker_swarm=None, integration_gke=None, ip_forwarding=None, labels=None, max_size=None, metadatas=None, min_size=None, name=None, network_interfaces=None, node_image=None, ondemand_count=None, preemptible_percentage=None, scaling_down_policies=None, scaling_up_policies=None, service_account=None, shutdown_script=None, startup_script=None, tags=None)

Get an existing Elastigroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cluster_id (pulumi.Input[str]) – The name of the GKE cluster you wish to import.

  • cluster_zone_name (pulumi.Input[str]) – The zone where the cluster is hosted.

  • node_image (pulumi.Input[str]) – The image that will be used for the node VMs. Possible values: COS, UBUNTU.

The backend_services object supports the following:

  • locationType (pulumi.Input[str])

  • namedPorts (pulumi.Input[list])

    • name (pulumi.Input[str])

    • ports (pulumi.Input[list])

  • scheme (pulumi.Input[str])

  • serviceName (pulumi.Input[str])

The disks object supports the following:

  • autoDelete (pulumi.Input[bool])

  • boot (pulumi.Input[bool])

  • deviceName (pulumi.Input[str])

  • initializeParams (pulumi.Input[list])

    • diskSizeGb (pulumi.Input[str])

    • diskType (pulumi.Input[str])

    • source_image (pulumi.Input[str])

  • interface (pulumi.Input[str])

  • mode (pulumi.Input[str])

  • source (pulumi.Input[str])

  • type (pulumi.Input[str])

The gpu object supports the following:

  • count (pulumi.Input[float])

  • type (pulumi.Input[str])

The instance_types_customs object supports the following:

  • memoryGib (pulumi.Input[float])

  • vcpu (pulumi.Input[float])

The integration_docker_swarm object supports the following:

  • masterHost (pulumi.Input[str])

  • masterPort (pulumi.Input[float])

The integration_gke object supports the following:

  • autoUpdate (pulumi.Input[bool])

  • autoscaleCooldown (pulumi.Input[float])

  • autoscaleDown (pulumi.Input[dict])

    • evaluationPeriods (pulumi.Input[float])

  • autoscaleHeadroom (pulumi.Input[dict])

    • cpuPerUnit (pulumi.Input[float])

    • memoryPerUnit (pulumi.Input[float])

    • numOfUnits (pulumi.Input[float])

  • autoscaleIsAutoConfig (pulumi.Input[bool])

  • autoscaleIsEnabled (pulumi.Input[bool])

  • autoscaleLabels (pulumi.Input[list])

    • key (pulumi.Input[str])

    • value (pulumi.Input[str])

  • cluster_id (pulumi.Input[str]) - The name of the GKE cluster you wish to import.

  • location (pulumi.Input[str])

The labels object supports the following:

  • key (pulumi.Input[str])

  • value (pulumi.Input[str])

The metadatas object supports the following:

  • key (pulumi.Input[str])

  • value (pulumi.Input[str])

The network_interfaces object supports the following:

  • accessConfigs (pulumi.Input[list])

    • name (pulumi.Input[str])

    • type (pulumi.Input[str])

  • aliasIpRanges (pulumi.Input[list])

    • ipCidrRange (pulumi.Input[str])

    • subnetworkRangeName (pulumi.Input[str])

  • network (pulumi.Input[str])

The scaling_down_policies object supports the following:

  • actionType (pulumi.Input[str])

  • adjustment (pulumi.Input[float])

  • cooldown (pulumi.Input[float])

  • dimensions (pulumi.Input[list])

    • name (pulumi.Input[str])

    • value (pulumi.Input[str])

  • evaluationPeriods (pulumi.Input[float])

  • metricName (pulumi.Input[str])

  • namespace (pulumi.Input[str])

  • operator (pulumi.Input[str])

  • period (pulumi.Input[float])

  • policyName (pulumi.Input[str])

  • source (pulumi.Input[str])

  • statistic (pulumi.Input[str])

  • threshold (pulumi.Input[float])

  • unit (pulumi.Input[str])

The scaling_up_policies object supports the following:

  • actionType (pulumi.Input[str])

  • adjustment (pulumi.Input[float])

  • cooldown (pulumi.Input[float])

  • dimensions (pulumi.Input[list])

    • name (pulumi.Input[str])

    • value (pulumi.Input[str])

  • evaluationPeriods (pulumi.Input[float])

  • metricName (pulumi.Input[str])

  • namespace (pulumi.Input[str])

  • operator (pulumi.Input[str])

  • period (pulumi.Input[float])

  • policyName (pulumi.Input[str])

  • source (pulumi.Input[str])

  • statistic (pulumi.Input[str])

  • threshold (pulumi.Input[float])

  • unit (pulumi.Input[str])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_spotinst.gke.OceanImport(resource_name, opts=None, autoscaler=None, backend_services=None, cluster_name=None, desired_capacity=None, location=None, max_size=None, min_size=None, scheduled_tasks=None, whitelists=None, __props__=None, __name__=None, __opts__=None)

Provides a Spotinst Ocean GKE import resource.

import pulumi
import pulumi_spotinst as spotinst

example = spotinst.gke.OceanImport("example",
    backend_services=[{
        "locationType": "regional",
        "namedPorts": [{
            "name": "http",
            "ports": [
                80,
                8080,
            ],
        }],
        "scheme": "INTERNAL",
        "serviceName": "example-backend-service",
    }],
    cluster_name="example-cluster-name",
    desired_capacity=0,
    location="us-central1-a",
    max_size=2,
    min_size=0,
    whitelists=[
        "n1-standard-1",
        "n1-standard-2",
    ])
  • scheduled_task - (Optional) Set scheduling object.

    • shutdown_hours - (Optional) Set shutdown hours for cluster object.

      • is_enabled - (Optional) Flag to enable / disable the shutdown hours. .. code-block:

        Example: True
        
      • time_windows - (Required) Set time windows for shutdown hours. specify a list of ‘timeWindows’ with at least one time window Each string is in the format of - ddd:hh:mm-ddd:hh:mm ddd = day of week = Sun | Mon | Tue | Wed | Thu | Fri | Sat hh = hour 24 = 0 -23 mm = minute = 0 - 59. Time windows should not overlap. required on cluster.scheduling.isEnabled = True. API Times are in UTC .. code-block:

        Example: Fri:15:30-Wed:14:30
        
    • tasks - (Optional) The scheduling tasks for the cluster.

      • is_enabled - (Required) Describes whether the task is enabled. When true the task should run when false it should not run. Required for cluster.scheduling.tasks object.

      • cron_expression - (Required) A valid cron expression. For example : ” * * * * * “.The cron is running in UTC time zone and is in Unix cron format Cron Expression Validator Script. Only one of ‘frequency’ or ‘cronExpression’ should be used at a time. Required for cluster.scheduling.tasks object .. code-block:

        Example: 0 1 * * *
        
      • task_type - (Required) Valid values: “clusterRoll”. Required for cluster.scheduling.tasks object.

      • batch_size_percentage - (Optional) Value in % to set size of batch in roll. Valid values are 0-100 .. code-block:

        Example: 20.
        
import pulumi

  • autoscaler - (Optional) The Ocean Kubernetes Autoscaler object.

  • is_enabled - (Optional, Default: true) Enable the Ocean Kubernetes Autoscaler.

  • is_auto_config - (Optional, Default: true) Automatically configure and optimize headroom resources.

  • auto_headroom_percentage - Optionally set the auto headroom percentage, set a number between 0-200 to control the headroom % from the cluster. Relevant when isAutoConfig=true.

  • cooldown - (Optional, Default: null) Cooldown period between scaling actions.

  • headroom - (Optional) Spare resource capacity management enabling fast assignment of Pods without waiting for new resources to launch.

  • cpu_per_unit - (Optional) Optionally configure the number of CPUs to allocate the headroom. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU.

  • memory_per_unit - (Optional) Optionally configure the amount of memory (MiB) to allocate the headroom.

  • gpu_per_unit - (Optional) How much GPU allocate for headroom unit.

  • num_of_units - (Optional) The number of units to retain as headroom, where each unit has the defined headroom CPU and memory.

  • down - (Optional) Auto Scaling scale down operations.

  • evaluation_periods - (Optional, Default: null) The number of evaluation periods that should accumulate before a scale down action takes place.

  • max_scale_down_percentage - (Optional) Would represent the maximum % to scale-down. Number between 1-100.

  • resource_limits - (Optional) Optionally set upper and lower bounds on the resource usage of the cluster.

  • max_vcpu - (Optional) The maximum cpu in vCpu units that can be allocated to the cluster.

  • max_memory_gib - (Optional) The maximum memory in GiB units that can be allocated to the cluster.

import pulumi
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • backend_services (pulumi.Input[list]) – Describes the backend service configurations.

  • cluster_name (pulumi.Input[str]) – The GKE cluster name.

  • desired_capacity (pulumi.Input[float]) – The number of instances to launch and maintain in the cluster.

  • location (pulumi.Input[str]) – The zone the master cluster is located in.

  • max_size (pulumi.Input[float]) – The upper limit of instances the cluster can scale up to.

  • min_size (pulumi.Input[float]) – The lower limit of instances the cluster can scale down to.

The autoscaler object supports the following:

  • autoHeadroomPercentage (pulumi.Input[float])

  • cooldown (pulumi.Input[float])

  • down (pulumi.Input[dict])

    • evaluationPeriods (pulumi.Input[float])

    • maxScaleDownPercentage (pulumi.Input[float])

  • headroom (pulumi.Input[dict])

    • cpuPerUnit (pulumi.Input[float])

    • gpuPerUnit (pulumi.Input[float])

    • memoryPerUnit (pulumi.Input[float])

    • numOfUnits (pulumi.Input[float])

  • isAutoConfig (pulumi.Input[bool])

  • isEnabled (pulumi.Input[bool])

  • resource_limits (pulumi.Input[dict])

    • maxMemoryGib (pulumi.Input[float])

    • maxVcpu (pulumi.Input[float])

The backend_services object supports the following:

  • locationType (pulumi.Input[str]) - Sets which location the backend services will be active. Valid values: regional, global.

  • namedPorts (pulumi.Input[list])

    • name (pulumi.Input[str])

    • ports (pulumi.Input[list]) - A list of ports.

  • scheme (pulumi.Input[str]) - Use when location_type is regional. Set the traffic for the backend service to either between the instances in the vpc or to traffic from the internet. Valid values: INTERNAL, EXTERNAL.

  • serviceName (pulumi.Input[str]) - The name of the backend service.

The scheduled_tasks object supports the following:

  • shutdownHours (pulumi.Input[dict])

    • isEnabled (pulumi.Input[bool])

    • timeWindows (pulumi.Input[list])

  • tasks (pulumi.Input[list])

    • batchSizePercentage (pulumi.Input[float])

    • cronExpression (pulumi.Input[str])

    • isEnabled (pulumi.Input[bool])

    • taskType (pulumi.Input[str])

backend_services: pulumi.Output[list] = None

Describes the backend service configurations.

  • locationType (str) - Sets which location the backend services will be active. Valid values: regional, global.

  • namedPorts (list)

    • name (str)

    • ports (list) - A list of ports.

  • scheme (str) - Use when location_type is regional. Set the traffic for the backend service to either between the instances in the vpc or to traffic from the internet. Valid values: INTERNAL, EXTERNAL.

  • serviceName (str) - The name of the backend service.

cluster_name: pulumi.Output[str] = None

The GKE cluster name.

desired_capacity: pulumi.Output[float] = None

The number of instances to launch and maintain in the cluster.

location: pulumi.Output[str] = None

The zone the master cluster is located in.

max_size: pulumi.Output[float] = None

The upper limit of instances the cluster can scale up to.

min_size: pulumi.Output[float] = None

The lower limit of instances the cluster can scale down to.

static get(resource_name, id, opts=None, autoscaler=None, backend_services=None, cluster_controller_id=None, cluster_name=None, desired_capacity=None, location=None, max_size=None, min_size=None, scheduled_tasks=None, whitelists=None)

Get an existing OceanImport resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • backend_services (pulumi.Input[list]) – Describes the backend service configurations.

  • cluster_name (pulumi.Input[str]) – The GKE cluster name.

  • desired_capacity (pulumi.Input[float]) – The number of instances to launch and maintain in the cluster.

  • location (pulumi.Input[str]) – The zone the master cluster is located in.

  • max_size (pulumi.Input[float]) – The upper limit of instances the cluster can scale up to.

  • min_size (pulumi.Input[float]) – The lower limit of instances the cluster can scale down to.

The autoscaler object supports the following:

  • autoHeadroomPercentage (pulumi.Input[float])

  • cooldown (pulumi.Input[float])

  • down (pulumi.Input[dict])

    • evaluationPeriods (pulumi.Input[float])

    • maxScaleDownPercentage (pulumi.Input[float])

  • headroom (pulumi.Input[dict])

    • cpuPerUnit (pulumi.Input[float])

    • gpuPerUnit (pulumi.Input[float])

    • memoryPerUnit (pulumi.Input[float])

    • numOfUnits (pulumi.Input[float])

  • isAutoConfig (pulumi.Input[bool])

  • isEnabled (pulumi.Input[bool])

  • resource_limits (pulumi.Input[dict])

    • maxMemoryGib (pulumi.Input[float])

    • maxVcpu (pulumi.Input[float])

The backend_services object supports the following:

  • locationType (pulumi.Input[str]) - Sets which location the backend services will be active. Valid values: regional, global.

  • namedPorts (pulumi.Input[list])

    • name (pulumi.Input[str])

    • ports (pulumi.Input[list]) - A list of ports.

  • scheme (pulumi.Input[str]) - Use when location_type is regional. Set the traffic for the backend service to either between the instances in the vpc or to traffic from the internet. Valid values: INTERNAL, EXTERNAL.

  • serviceName (pulumi.Input[str]) - The name of the backend service.

The scheduled_tasks object supports the following:

  • shutdownHours (pulumi.Input[dict])

    • isEnabled (pulumi.Input[bool])

    • timeWindows (pulumi.Input[list])

  • tasks (pulumi.Input[list])

    • batchSizePercentage (pulumi.Input[float])

    • cronExpression (pulumi.Input[str])

    • isEnabled (pulumi.Input[bool])

    • taskType (pulumi.Input[str])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_spotinst.gke.OceanLaunchSpec(resource_name, opts=None, autoscale_headrooms=None, labels=None, metadatas=None, ocean_id=None, source_image=None, taints=None, __props__=None, __name__=None, __opts__=None)

Provides a custom Spotinst Ocean GKE Launch Spec resource.

import pulumi
import pulumi_spotinst as spotinst

example = spotinst.gke.OceanLaunchSpec("example",
    autoscale_headrooms=[{
        "cpuPerUnit": 1000,
        "gpuPerUnit": 0,
        "memoryPerUnit": 2048,
        "numOfUnits": 5,
    }],
    labels=[{
        "key": "labelKey",
        "value": "labelVal",
    }],
    metadatas=[{
        "key": "gci-update-strategy",
        "value": "update_disabled",
    }],
    ocean_id="o-123456",
    source_image="image",
    taints=[{
        "effect": "taintEffect",
        "key": "taintKey",
        "value": "taintVal",
    }])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • autoscale_headrooms (pulumi.Input[list]) – Set custom headroom per launch spec. provide list of headrooms object.

  • labels (pulumi.Input[list]) – Cluster’s labels.

  • metadatas (pulumi.Input[list]) – Cluster’s metadata.

  • ocean_id (pulumi.Input[str]) – The Ocean cluster ID required for launchSpec create.

  • source_image (pulumi.Input[str]) – Image URL.

  • taints (pulumi.Input[list]) – Cluster’s taints.

The autoscale_headrooms object supports the following:

  • cpuPerUnit (pulumi.Input[float]) - Optionally configure the number of CPUs to allocate for each headroom unit. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU.

  • gpuPerUnit (pulumi.Input[float]) - Optionally configure the number of GPUS to allocate for each headroom unit.

  • memoryPerUnit (pulumi.Input[float]) - Optionally configure the amount of memory (MB) to allocate for each headroom unit.

  • numOfUnits (pulumi.Input[float]) - The number of units to retain as headroom, where each unit has the defined headroom CPU, memory and GPU.

The labels object supports the following:

  • key (pulumi.Input[str])

  • value (pulumi.Input[str])

The metadatas object supports the following:

  • key (pulumi.Input[str])

  • value (pulumi.Input[str])

The taints object supports the following:

  • effect (pulumi.Input[str])

  • key (pulumi.Input[str])

  • value (pulumi.Input[str])

autoscale_headrooms: pulumi.Output[list] = None

Set custom headroom per launch spec. provide list of headrooms object.

  • cpuPerUnit (float) - Optionally configure the number of CPUs to allocate for each headroom unit. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU.

  • gpuPerUnit (float) - Optionally configure the number of GPUS to allocate for each headroom unit.

  • memoryPerUnit (float) - Optionally configure the amount of memory (MB) to allocate for each headroom unit.

  • numOfUnits (float) - The number of units to retain as headroom, where each unit has the defined headroom CPU, memory and GPU.

labels: pulumi.Output[list] = None

Cluster’s labels.

  • key (str)

  • value (str)

metadatas: pulumi.Output[list] = None

Cluster’s metadata.

  • key (str)

  • value (str)

ocean_id: pulumi.Output[str] = None

The Ocean cluster ID required for launchSpec create.

source_image: pulumi.Output[str] = None

Image URL.

taints: pulumi.Output[list] = None

Cluster’s taints.

  • effect (str)

  • key (str)

  • value (str)

static get(resource_name, id, opts=None, autoscale_headrooms=None, labels=None, metadatas=None, ocean_id=None, source_image=None, taints=None)

Get an existing OceanLaunchSpec resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • autoscale_headrooms (pulumi.Input[list]) – Set custom headroom per launch spec. provide list of headrooms object.

  • labels (pulumi.Input[list]) – Cluster’s labels.

  • metadatas (pulumi.Input[list]) – Cluster’s metadata.

  • ocean_id (pulumi.Input[str]) – The Ocean cluster ID required for launchSpec create.

  • source_image (pulumi.Input[str]) – Image URL.

  • taints (pulumi.Input[list]) – Cluster’s taints.

The autoscale_headrooms object supports the following:

  • cpuPerUnit (pulumi.Input[float]) - Optionally configure the number of CPUs to allocate for each headroom unit. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU.

  • gpuPerUnit (pulumi.Input[float]) - Optionally configure the number of GPUS to allocate for each headroom unit.

  • memoryPerUnit (pulumi.Input[float]) - Optionally configure the amount of memory (MB) to allocate for each headroom unit.

  • numOfUnits (pulumi.Input[float]) - The number of units to retain as headroom, where each unit has the defined headroom CPU, memory and GPU.

The labels object supports the following:

  • key (pulumi.Input[str])

  • value (pulumi.Input[str])

The metadatas object supports the following:

  • key (pulumi.Input[str])

  • value (pulumi.Input[str])

The taints object supports the following:

  • effect (pulumi.Input[str])

  • key (pulumi.Input[str])

  • value (pulumi.Input[str])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_spotinst.gke.OceanLaunchSpecImport(resource_name, opts=None, node_pool_name=None, ocean_id=None, __props__=None, __name__=None, __opts__=None)

Provides a custom Spotinst Ocean GKE Launch Spec Import resource.

import pulumi
import pulumi_spotinst as spotinst

example = spotinst.gke.OceanLaunchSpecImport("example",
    node_pool_name="default-pool",
    ocean_id="o-123456")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • node_pool_name (pulumi.Input[str]) – The node pool you wish to use in your launchSpec.

  • ocean_id (pulumi.Input[str]) – The Ocean cluster ID required for launchSpec create.

node_pool_name: pulumi.Output[str] = None

The node pool you wish to use in your launchSpec.

ocean_id: pulumi.Output[str] = None

The Ocean cluster ID required for launchSpec create.

static get(resource_name, id, opts=None, node_pool_name=None, ocean_id=None)

Get an existing OceanLaunchSpecImport resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • node_pool_name (pulumi.Input[str]) – The node pool you wish to use in your launchSpec.

  • ocean_id (pulumi.Input[str]) – The Ocean cluster ID required for launchSpec create.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str