Class Elastigroup
Provides a Spotinst elastigroup GCP resource.
GPU
gpu- (Optional) Defines the GPU configuration.type- (Required) The type of GPU instance. Valid values:nvidia-tesla-v100,nvidia-tesla-p100,nvidia-tesla-k80.count- (Required) The number of GPUs. Must be 0, 2, 4, 6, 8.
Usage:
using Pulumi;
class MyStack : Stack
{
public MyStack()
{
}
}
<a id="health-check"></a>
Backend Services
backend_services- (Optional) Describes the backend service configurations.service_name- (Required) The name of the backend service.location_type- (Optional) Sets which location the backend services will be active. Valid values:regional,global.scheme- (Optional) Use whenlocation_typeis "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.named_port- (Optional) Describes a named port and a list of ports.port_name- (Required) The name of the port.ports- (Required) A list of ports.
Usage:
using Pulumi;
class MyStack : Stack
{
public MyStack()
{
}
}
<a id="disks"></a>
Disks
disks- (Optional) Array of disks associated with this instance. Persistent disks must be created before you can assign them.auto_delete- (Optional) Specifies whether the disk will be auto-deleted when the instance is deleted.boot- (Optional) Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.device_name- (Optional) Specifies a unique device name of your choice.interface- (Optional, Default:SCSI) Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME.mode- (Optional, Default:READ_WRITE) The mode in which to attach this disk, either READ_WRITE or READ_ONLY.source- (Optional) Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.type- (Optional, Default:PERSISTENT) Specifies the type of disk, either SCRATCH or PERSISTENT.initialize_params- (Optional) Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.disk_size_gb- (Optional) Specifies disk size in gigabytes. Must be in increments of 2.disk_type- (Optional, Default"pd-standard) Specifies the disk type to use to create the instance. Valid values: pd-ssd, local-ssd.source_image- (Optional) A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project.
Usage:
using Pulumi;
class MyStack : Stack
{
public MyStack()
{
}
}
<a id="network-interface"></a>
Network Interfaces
Each of the network_interface attributes controls a portion of the GCP
Instance's "Network Interfaces". It's a good idea to familiarize yourself with GCP's Network
Interfaces docs
to understand the implications of using these attributes.
network_interface- (Required, minimum 1) Array of objects representing the network configuration for the elastigroup.network- (Required) Network resource for this group.access_configs- (Optional) Array of configurations.name- (Optional) Name of this access configuration.type- (Optional) Array of configurations for this interface. Currently, only ONE_TO_ONE_NAT is supported.
using Pulumi;
class MyStack : Stack
{
public MyStack()
{
}
}
<a id="scaling-policy"></a>
Scaling Policies
scaling_up_policy- (Optional) Contains scaling policies for scaling the Elastigroup up.scaling_down_policy- (Optional) Contains scaling policies for scaling the Elastigroup down.
Each scaling_*_policy supports the following:
policy_name- (Optional) Name of scaling policy.metric_name- (Optional) Metric to monitor. Valid values: "Percentage CPU", "Network In", "Network Out", "Disk Read Bytes", "Disk Write Bytes", "Disk Write Operations/Sec", "Disk Read Operations/Sec".statistic- (Optional) Statistic by which to evaluate the selected metric. Valid values: "AVERAGE", "SAMPLE_COUNT", "SUM", "MINIMUM", "MAXIMUM", "PERCENTILE", "COUNT".threshold- (Optional) The value at which the scaling action is triggered.period- (Optional) Amount of time (seconds) for which the threshold must be met in order to trigger the scaling action.evaluation_periods- (Optional) Number of consecutive periods in which the threshold must be met in order to trigger a scaling action.cooldown- (Optional) Time (seconds) to wait after a scaling action before resuming monitoring.operator- (Optional) The operator used to evaluate the threshold against the current metric value. Valid values: "gt" (greater than), "get" (greater-than or equal), "lt" (less than), "lte" (less than or equal).action- (Optional) Scaling action to take when the policy is triggered.type- (Optional) Type of scaling action to take when the scaling policy is triggered. Valid values: "adjustment", "setMinTarget", "updateCapacity", "percentageAdjustment"adjustment- (Optional) Value to which the action type will be adjusted. Required if using "numeric" or "percentageAdjustment" action types.dimensions- (Optional) A list of dimensions describing qualities of the metric.name- (Required) The dimension name.value- (Required) The dimension value.
Usage:
using Pulumi;
class MyStack : Stack
{
public MyStack()
{
}
}
<a id="third-party-integrations"></a>
Third-Party Integrations
integration_docker_swarm- (Optional) Describes the Docker Swarm integration.master_host- (Required) IP or FQDN of one of your swarm managers.master_port- (Required) Network port used by your swarm.
Usage:
using Pulumi;
class MyStack : Stack
{
public MyStack()
{
}
}
<a id="scheduled-task"></a>
Scheduled Tasks
Each scheduled_task supports the following:
task_type- (Required) The task type to run. Valid values:"setCapacity".cron_expression- (Optional) A valid cron expression. The cron is running in UTC time zone and is in Unix cron format.is_enabled- (Optional, Default:true) Setting the task to being enabled or disabled.target_capacity- (Optional) The desired number of instances the group should have.min_capacity- (Optional) The minimum number of instances the group should have.max_capacity- (Optional) The maximum number of instances the group should have.
Usage:
using Pulumi;
class MyStack : Stack
{
public MyStack()
{
}
}
Inherited Members
Namespace: Pulumi.SpotInst.Gcp
Assembly: Pulumi.SpotInst.dll
Syntax
public class Elastigroup : CustomResource
Constructors
View SourceElastigroup(String, ElastigroupArgs, CustomResourceOptions)
Create a Elastigroup resource with the given unique name, arguments, and options.
Declaration
public Elastigroup(string name, ElastigroupArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ElastigroupArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAutoHealing
Declaration
public Output<bool?> AutoHealing { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
AvailabilityZones
List of availability zones for the group.
Declaration
public Output<ImmutableArray<string>> AvailabilityZones { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
BackendServices
Declaration
public Output<ImmutableArray<ElastigroupBackendService>> BackendServices { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ElastigroupBackendService>> |
Description
The region your GCP group will be created in.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DesiredCapacity
The desired number of instances the group should have at any time.
Declaration
public Output<int> DesiredCapacity { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Disks
Declaration
public Output<ImmutableArray<ElastigroupDisk>> Disks { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ElastigroupDisk>> |
DrainingTimeout
Time (seconds) the instance is allowed to run after it is detached from the group. This is to allow the instance time to drain all the current TCP connections before terminating it.
Declaration
public Output<int?> DrainingTimeout { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
FallbackToOndemand
Activate fallback-to-on-demand. When provisioning an instance, if no Preemptible market is available, fallback-to-on-demand will provision an On-Demand instance to maintain the group capacity.
Declaration
public Output<bool?> FallbackToOndemand { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Gpu
Declaration
public Output<ImmutableArray<ElastigroupGpu>> Gpu { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ElastigroupGpu>> |
HealthCheckGracePeriod
Declaration
public Output<int?> HealthCheckGracePeriod { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
HealthCheckType
Declaration
public Output<string> HealthCheckType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InstanceTypesCustoms
Defines a set of custom instance types. Required if instance_types_preemptible and instance_types_ondemand are not set.
Declaration
public Output<ImmutableArray<ElastigroupInstanceTypesCustom>> InstanceTypesCustoms { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ElastigroupInstanceTypesCustom>> |
InstanceTypesOndemand
The regular VM instance type to use for mixed-type groups and when falling back to on-demand. Required if instance_types_preemptible is not set.
Declaration
public Output<string> InstanceTypesOndemand { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InstanceTypesPreemptibles
The preemptible VMs instance type. To maximize cost savings and market availability, select as many types as possible. Required if instance_types_ondemand is not set.
Declaration
public Output<ImmutableArray<string>> InstanceTypesPreemptibles { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
IntegrationDockerSwarm
Declaration
public Output<ElastigroupIntegrationDockerSwarm> IntegrationDockerSwarm { get; }
Property Value
| Type | Description |
|---|---|
| Output<ElastigroupIntegrationDockerSwarm> |
IntegrationGke
Declaration
public Output<ElastigroupIntegrationGke> IntegrationGke { get; }
Property Value
| Type | Description |
|---|---|
| Output<ElastigroupIntegrationGke> |
IpForwarding
Declaration
public Output<bool?> IpForwarding { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Labels
Array of objects with key-value pairs.
Declaration
public Output<ImmutableArray<ElastigroupLabel>> Labels { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ElastigroupLabel>> |
MaxSize
The maximum number of instances the group should have at any time.
Declaration
public Output<int> MaxSize { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Metadatas
Array of objects with key-value pairs.
Declaration
public Output<ImmutableArray<ElastigroupMetadata>> Metadatas { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ElastigroupMetadata>> |
MinSize
The minimum number of instances the group should have at any time.
Declaration
public Output<int> MinSize { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Name
The group name.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NetworkInterfaces
Declaration
public Output<ImmutableArray<ElastigroupNetworkInterface>> NetworkInterfaces { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ElastigroupNetworkInterface>> |
OndemandCount
Declaration
public Output<int?> OndemandCount { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
PreemptiblePercentage
Percentage of Preemptible VMs to spin up from the "desired_capacity".
Declaration
public Output<int?> PreemptiblePercentage { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
ScalingDownPolicies
Declaration
public Output<ImmutableArray<ElastigroupScalingDownPolicy>> ScalingDownPolicies { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ElastigroupScalingDownPolicy>> |
ScalingUpPolicies
Declaration
public Output<ImmutableArray<ElastigroupScalingUpPolicy>> ScalingUpPolicies { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ElastigroupScalingUpPolicy>> |
ScheduledTasks
Declaration
public Output<ImmutableArray<ElastigroupScheduledTask>> ScheduledTasks { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ElastigroupScheduledTask>> |
ServiceAccount
The email of the service account in which the group instances will be launched.
Declaration
public Output<string> ServiceAccount { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ShutdownScript
The Base64-encoded shutdown script that executes prior to instance termination, for more information please see: Shutdown Script
Declaration
public Output<string> ShutdownScript { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
StartupScript
Create and run your own startup scripts on your virtual machines to perform automated tasks every time your instance boots up.
Declaration
public Output<string> StartupScript { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Subnets
A list of regions and subnets.
Declaration
public Output<ImmutableArray<ElastigroupSubnet>> Subnets { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ElastigroupSubnet>> |
Tags
Tags to mark created instances.
Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
UnhealthyDuration
Declaration
public Output<int?> UnhealthyDuration { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Methods
View SourceGet(String, Input<String>, ElastigroupState, CustomResourceOptions)
Get an existing Elastigroup resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Elastigroup Get(string name, Input<string> id, ElastigroupState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ElastigroupState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Elastigroup |