Elastigroup

Provides a Spotinst elastigroup Azure resource.

Load Balancers

  • load_balancers - (Required) Describes a set of one or more classic load balancer target groups and/or Multai load balancer target sets.
  • type - (Required) The resource type. Valid values: CLASSIC, TARGET_GROUP, MULTAI_TARGET_SET.
  • balancer_id - (Required) The balancer ID.
  • target_set_id - (Required) The scale set ID associated with the load balancer.
  • auto_weight - (Optional, Default: false)
import * as pulumi from "@pulumi/pulumi";
import pulumi
using Pulumi;

class MyStack : Stack
{
    public MyStack()
    {
    }

}

Image

  • image - (Required) Image of a VM. An image is a template for creating new VMs. Choose from Azure image catalogue (marketplace) or use a custom image.
  • publisher - (Optional) Image publisher. Required if resource_group_name is not specified.
  • offer - (Optional) Name of the image to use. Required if publisher is specified.
  • sku - (Optional) Image’s Stock Keeping Unit, which is the specific version of the image. Required if publisher is specified.
  • resource_group_name - (Optional) Name of Resource Group for custom image. Required if publisher not specified.
  • image_name - (Optional) Name of the custom image. Required if resource_group_name is specified.
import * as pulumi from "@pulumi/pulumi";
import pulumi
using Pulumi;

class MyStack : Stack
{
    public MyStack()
    {
    }

}

Health Check

  • health_check - (Optional) Describes the health check configuration.
  • health_check_type - (Optional) Health check used to validate VM health. Valid values: “INSTANCE_STATE”.
  • grace_period - (Optional) Period of time (seconds) to wait for VM to reach healthiness before monitoring for unhealthiness.
  • auto_healing - (Optional) Enable auto-healing of unhealthy VMs.
import * as pulumi from "@pulumi/pulumi";
import pulumi
using Pulumi;

class MyStack : Stack
{
    public MyStack()
    {
    }

}

Network

  • network - (Required) Defines the Virtual Network and Subnet for your Elastigroup.
  • virtual_network_name - (Required) Name of Vnet.
  • subnet_name - (Required) ID of subnet.
  • resource_group_name - (Required) Vnet Resource Group Name.
  • assign_public_up - (Optional, Default: false) Assign a public IP to each VM in the Elastigroup.
  • additional_ip_configs - (Optional) Array of additional IP configuration objects.
  • name - (Required) The IP configuration name.
  • private_ip_version - (Optional) Available from Azure Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Valid values: IPv4, IPv6.
import * as pulumi from "@pulumi/pulumi";
import pulumi
using Pulumi;

class MyStack : Stack
{
    public MyStack()
    {
    }

}

Login

import * as pulumi from "@pulumi/pulumi";
import pulumi
using Pulumi;

class MyStack : Stack
{
    public MyStack()
    {
    }

}

Login

  • login - (Required) Describes the login configuration.
  • user_name - (Required) Set admin access for accessing your VMs.
  • ssh_public_key - (Optional) SSH for admin access to Linux VMs. Required for Linux product types.
  • password - (Optional) Password for admin access to Windows VMs. Required for Windows product types.
import * as pulumi from "@pulumi/pulumi";
import pulumi
using Pulumi;

class MyStack : Stack
{
    public MyStack()
    {
    }

}

Scheduling

  • scheduled_task - (Optional) Describes the configuration of one or more scheduled tasks.
  • is_enabled - (Optional, Default: true) Describes whether the task is enabled. When true the task should run when false it should not run.
  • cron_expression - (Required) A valid cron expression (* * * * *). The cron is running in UTC time zone and is in Unix cron format Cron Expression Validator Script.
  • task_type - (Required) The task type to run. Valid Values: backup_ami, scale, scaleUp, roll, statefulUpdateCapacity, statefulRecycle.
  • scale_min_capacity - (Optional) The min capacity of the group. Should be used when choosing ‘task_type’ of ‘scale’.
  • scale_max_capacity - (Optional) The max capacity of the group. Required when ‘task_type’ is ‘scale’.
  • scale_target_capacity - (Optional) The target capacity of the group. Should be used when choosing ‘task_type’ of ‘scale’.
  • adjustment - (Optional) The number of instances to add/remove to/from the target capacity when scale is needed.
  • adjustment_percentage - (Optional) The percent of instances to add/remove to/from the target capacity when scale is needed.
  • batch_size_percentage - (Optional) The percentage size of each batch in the scheduled deployment roll. Required when the ‘task_type’ is ‘roll’.
  • grace_period - (Optional) The time to allow instances to become healthy.
import * as pulumi from "@pulumi/pulumi";
import pulumi
using Pulumi;

class MyStack : Stack
{
    public MyStack()
    {
    }

}

Update Policy

  • update_policy - (Optional)

    • should_roll - (Required) Sets the enablement of the roll option.
    • roll_config - (Required) While used, you can control whether the group should perform a deployment after an update to the configuration.
      • batch_size_percentage - (Required) Sets the percentage of the instances to deploy in each batch.
      • health_check_type - (Optional) Sets the health check type to use. Valid values: "INSTANCE_STATE", "NONE".
      • grace_period - (Optional) Sets the grace period for new instances to become healthy.
import * as pulumi from "@pulumi/pulumi";
import pulumi
using Pulumi;

class MyStack : Stack
{
    public MyStack()
    {
    }

}

Third-Party Integrations

  • integration_kubernetes - (Optional) Describes the Kubernetes integration.
    • cluster_identifier - (Required) The cluster ID.

Usage:

import * as pulumi from "@pulumi/pulumi";
import pulumi
using Pulumi;

class MyStack : Stack
{
    public MyStack()
    {
    }

}
  • integration_multai_runtime - (Optional) Describes the Multai Runtime integration.
    • deployment_id - (Optional) The deployment id you want to get

Usage:

import * as pulumi from "@pulumi/pulumi";
import pulumi
using Pulumi;

class MyStack : Stack
{
    public MyStack()
    {
    }

}

Example Usage

using Pulumi;
using SpotInst = Pulumi.SpotInst;

class MyStack : Stack
{
    public MyStack()
    {
        var testAzureGroup = new SpotInst.Azure.Elastigroup("testAzureGroup", new SpotInst.Azure.ElastigroupArgs
        {
            DesiredCapacity = 1,
            HealthCheck = new SpotInst.Azure.Inputs.ElastigroupHealthCheckArgs
            {
                AutoHealing = true,
                GracePeriod = 120,
                HealthCheckType = "INSTANCE_STATE",
            },
            Images = 
            {
                new SpotInst.Azure.Inputs.ElastigroupImageArgs
                {
                    Marketplace = 
                    {
                        
                        {
                            { "offer", "UbuntuServer" },
                            { "publisher", "Canonical" },
                            { "sku", "16.04-LTS" },
                        },
                    },
                },
            },
            LoadBalancers = 
            {
                new SpotInst.Azure.Inputs.ElastigroupLoadBalancerArgs
                {
                    AutoWeight = true,
                    BalancerId = "lb-1ee2e3q",
                    TargetSetId = "ts-3eq",
                    Type = "MULTAI_TARGET_SET",
                },
            },
            Login = new SpotInst.Azure.Inputs.ElastigroupLoginArgs
            {
                SshPublicKey = "33a2s1f3g5a1df5g1ad3f2g1adfg56dfg==",
                UserName = "admin",
            },
            LowPrioritySizes = 
            {
                "standard_a1_v1",
                "standard_a1_v2",
            },
            ManagedServiceIdentities = 
            {
                new SpotInst.Azure.Inputs.ElastigroupManagedServiceIdentityArgs
                {
                    Name = "example-identity",
                    ResourceGroupName = "spotinst-azure",
                },
            },
            MaxSize = 1,
            MinSize = 0,
            Network = new SpotInst.Azure.Inputs.ElastigroupNetworkArgs
            {
                AssignPublicIp = true,
                ResourceGroupName = "subnetResourceGroup",
                SubnetName = "my-subnet-name",
                VirtualNetworkName = "vname",
            },
            OdSizes = 
            {
                "standard_a1_v1",
                "standard_a1_v2",
            },
            Product = "Linux",
            Region = "eastus",
            ResourceGroupName = "spotinst-azure",
            ScalingDownPolicies = 
            {
                new SpotInst.Azure.Inputs.ElastigroupScalingDownPolicyArgs
                {
                    ActionType = "adjustment",
                    Adjustment = "MIN(5,10)",
                    Cooldown = 60,
                    Dimensions = 
                    {
                        new SpotInst.Azure.Inputs.ElastigroupScalingDownPolicyDimensionArgs
                        {
                            Name = "name-1",
                            Value = "value-1",
                        },
                    },
                    EvaluationPeriods = 10,
                    MetricName = "CPUUtilization",
                    Namespace = "Microsoft.Compute",
                    Operator = "gt",
                    Period = 60,
                    PolicyName = "policy-name",
                    Statistic = "average",
                    Threshold = 10,
                    Unit = "percent",
                },
            },
            ScalingUpPolicies = 
            {
                new SpotInst.Azure.Inputs.ElastigroupScalingUpPolicyArgs
                {
                    ActionType = "setMinTarget",
                    Cooldown = 60,
                    Dimensions = 
                    {
                        new SpotInst.Azure.Inputs.ElastigroupScalingUpPolicyDimensionArgs
                        {
                            Name = "resourceName",
                            Value = "resource-name",
                        },
                        new SpotInst.Azure.Inputs.ElastigroupScalingUpPolicyDimensionArgs
                        {
                            Name = "resourceGroupName",
                            Value = "resource-group-name",
                        },
                    },
                    EvaluationPeriods = 10,
                    MetricName = "CPUUtilization",
                    MinTargetCapacity = "1",
                    Namespace = "Microsoft.Compute",
                    Operator = "gt",
                    Period = 60,
                    PolicyName = "policy-name",
                    Statistic = "average",
                    Threshold = 10,
                    Unit = "percent",
                },
            },
            ScheduledTasks = 
            {
                new SpotInst.Azure.Inputs.ElastigroupScheduledTaskArgs
                {
                    Adjustment = "2",
                    AdjustmentPercentage = "50",
                    BatchSizePercentage = "33",
                    CronExpression = "* * * * *",
                    GracePeriod = "300",
                    IsEnabled = true,
                    ScaleMaxCapacity = "8",
                    ScaleMinCapacity = "5",
                    ScaleTargetCapacity = "6",
                    TaskType = "scale",
                },
            },
            ShutdownScript = "",
            Strategy = new SpotInst.Azure.Inputs.ElastigroupStrategyArgs
            {
                DrainingTimeout = 300,
                OdCount = 1,
            },
            UserData = "",
        });
    }

}

Coming soon!

import pulumi
import pulumi_spotinst as spotinst

test_azure_group = spotinst.azure.Elastigroup("testAzureGroup",
    desired_capacity=1,
    health_check={
        "auto_healing": True,
        "grace_period": 120,
        "health_check_type": "INSTANCE_STATE",
    },
    images=[{
        "marketplace": [{
            "offer": "UbuntuServer",
            "publisher": "Canonical",
            "sku": "16.04-LTS",
        }],
    }],
    load_balancers=[{
        "autoWeight": True,
        "balancer_id": "lb-1ee2e3q",
        "target_set_id": "ts-3eq",
        "type": "MULTAI_TARGET_SET",
    }],
    login={
        "sshPublicKey": "33a2s1f3g5a1df5g1ad3f2g1adfg56dfg==",
        "userName": "admin",
    },
    low_priority_sizes=[
        "standard_a1_v1",
        "standard_a1_v2",
    ],
    managed_service_identities=[{
        "name": "example-identity",
        "resource_group_name": "spotinst-azure",
    }],
    max_size=1,
    min_size=0,
    network={
        "assignPublicIp": True,
        "resource_group_name": "subnetResourceGroup",
        "subnetName": "my-subnet-name",
        "virtualNetworkName": "vname",
    },
    od_sizes=[
        "standard_a1_v1",
        "standard_a1_v2",
    ],
    product="Linux",
    region="eastus",
    resource_group_name="spotinst-azure",
    scaling_down_policies=[{
        "actionType": "adjustment",
        "adjustment": "MIN(5,10)",
        "cooldown": 60,
        "dimensions": [{
            "name": "name-1",
            "value": "value-1",
        }],
        "evaluationPeriods": "10",
        "metricName": "CPUUtilization",
        "namespace": "Microsoft.Compute",
        "operator": "gt",
        "period": "60",
        "policyName": "policy-name",
        "statistic": "average",
        "threshold": 10,
        "unit": "percent",
    }],
    scaling_up_policies=[{
        "actionType": "setMinTarget",
        "cooldown": 60,
        "dimensions": [
            {
                "name": "resourceName",
                "value": "resource-name",
            },
            {
                "name": "resourceGroupName",
                "value": "resource-group-name",
            },
        ],
        "evaluationPeriods": "10",
        "metricName": "CPUUtilization",
        "minTargetCapacity": 1,
        "namespace": "Microsoft.Compute",
        "operator": "gt",
        "period": "60",
        "policyName": "policy-name",
        "statistic": "average",
        "threshold": 10,
        "unit": "percent",
    }],
    scheduled_tasks=[{
        "adjustment": 2,
        "adjustmentPercentage": 50,
        "batchSizePercentage": 33,
        "cronExpression": "* * * * *",
        "grace_period": 300,
        "isEnabled": True,
        "scaleMaxCapacity": 8,
        "scaleMinCapacity": 5,
        "scaleTargetCapacity": 6,
        "taskType": "scale",
    }],
    shutdown_script="",
    strategy={
        "draining_timeout": 300,
        "odCount": 1,
    },
    user_data="")
import * as pulumi from "@pulumi/pulumi";
import * as spotinst from "@pulumi/spotinst";

const testAzureGroup = new spotinst.azure.Elastigroup("test_azure_group", {
    desiredCapacity: 1,
    // --- HEALTH-CHECKS -------------------------------------------------
    healthCheck: {
        autoHealing: true,
        gracePeriod: 120,
        healthCheckType: "INSTANCE_STATE",
    },
    // --- IMAGE ---------------------------------------------------------
    images: [{
        marketplaces: [{
            offer: "UbuntuServer",
            publisher: "Canonical",
            sku: "16.04-LTS",
        }],
    }],
    // --- LOAD BALANCERS ------------------------------------------------
    loadBalancers: [{
        autoWeight: true,
        balancerId: "lb-1ee2e3q",
        targetSetId: "ts-3eq",
        type: "MULTAI_TARGET_SET",
    }],
    // --- LOGIN ---------------------------------------------------------
    login: {
        sshPublicKey: "33a2s1f3g5a1df5g1ad3f2g1adfg56dfg==",
        userName: "admin",
    },
    lowPrioritySizes: [
        "standard_a1_v1",
        "standard_a1_v2",
    ],
    managedServiceIdentities: [{
        name: "example-identity",
        resourceGroupName: "spotinst-azure",
    }],
    maxSize: 1,
    // --- CAPACITY ------------------------------------------------------
    minSize: 0,
    // --- NETWORK -------------------------------------------------------
    network: {
        assignPublicIp: true,
        resourceGroupName: "subnetResourceGroup",
        subnetName: "my-subnet-name",
        virtualNetworkName: "vname",
    },
    // --- INSTANCE TYPES ------------------------------------------------
    odSizes: [
        "standard_a1_v1",
        "standard_a1_v2",
    ],
    product: "Linux",
    region: "eastus",
    resourceGroupName: "spotinst-azure",
    scalingDownPolicies: [{
        actionType: "adjustment",
        adjustment: "MIN(5,10)",
        cooldown: 60,
        dimensions: [{
            name: "name-1",
            value: "value-1",
        }],
        evaluationPeriods: 10,
        metricName: "CPUUtilization",
        namespace: "Microsoft.Compute",
        operator: "gt",
        period: 60,
        policyName: "policy-name",
        statistic: "average",
        threshold: 10,
        unit: "percent",
    }],
    // --- SCALING POLICIES ----------------------------------------------
    scalingUpPolicies: [{
        actionType: "setMinTarget",
        cooldown: 60,
        dimensions: [
            {
                name: "resourceName",
                value: "resource-name",
            },
            {
                name: "resourceGroupName",
                value: "resource-group-name",
            },
        ],
        evaluationPeriods: 10,
        metricName: "CPUUtilization",
        minTargetCapacity: "1",
        namespace: "Microsoft.Compute",
        operator: "gt",
        period: 60,
        policyName: "policy-name",
        statistic: "average",
        threshold: 10,
        unit: "percent",
    }],
    // --- SCHEDULED TASK ------------------------------------------------
    scheduledTasks: [{
        adjustment: "2",
        adjustmentPercentage: "50",
        batchSizePercentage: "33",
        cronExpression: "* * * * *",
        gracePeriod: "300",
        isEnabled: true,
        scaleMaxCapacity: "8",
        scaleMinCapacity: "5",
        scaleTargetCapacity: "6",
        taskType: "scale",
    }],
    shutdownScript: "",
    // --- STRATEGY ------------------------------------------------------
    strategy: {
        drainingTimeout: 300,
        odCount: 1,
    },
    userData: "",
});

Create a Elastigroup Resource

def Elastigroup(resource_name, opts=None, custom_data=None, desired_capacity=None, health_check=None, images=None, integration_kubernetes=None, integration_multai_runtime=None, load_balancers=None, login=None, low_priority_sizes=None, managed_service_identities=None, max_size=None, min_size=None, name=None, network=None, od_sizes=None, product=None, region=None, resource_group_name=None, scaling_down_policies=None, scaling_up_policies=None, scheduled_tasks=None, shutdown_script=None, strategy=None, update_policy=None, user_data=None, __props__=None);
func NewElastigroup(ctx *Context, name string, args ElastigroupArgs, opts ...ResourceOption) (*Elastigroup, error)
public Elastigroup(string name, ElastigroupArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ElastigroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ElastigroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ElastigroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Elastigroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Elastigroup resource accepts the following input properties:

LowPrioritySizes List<string>

Available Low-Priority sizes.

Network Pulumi.SpotInst.Azure.Inputs.ElastigroupNetworkArgs
OdSizes List<string>

Available On-Demand sizes

Product string

Operation system type. Valid values: "Linux", "Windows".

Region string

The region your Azure group will be created in.

ResourceGroupName string

The Resource Group that the user-assigned managed identity resides in.

Strategy Pulumi.SpotInst.Azure.Inputs.ElastigroupStrategyArgs

Describes the deployment strategy.

CustomData string
DesiredCapacity int

The desired number of instances the group should have at any time.

HealthCheck Pulumi.SpotInst.Azure.Inputs.ElastigroupHealthCheckArgs
Images List<Pulumi.SpotInst.Azure.Inputs.ElastigroupImageArgs>
IntegrationKubernetes Pulumi.SpotInst.Azure.Inputs.ElastigroupIntegrationKubernetesArgs
IntegrationMultaiRuntime Pulumi.SpotInst.Azure.Inputs.ElastigroupIntegrationMultaiRuntimeArgs
LoadBalancers List<Pulumi.SpotInst.Azure.Inputs.ElastigroupLoadBalancerArgs>
Login Pulumi.SpotInst.Azure.Inputs.ElastigroupLoginArgs
ManagedServiceIdentities List<Pulumi.SpotInst.Azure.Inputs.ElastigroupManagedServiceIdentityArgs>
MaxSize int

The maximum number of instances the group should have at any time.

MinSize int

The minimum number of instances the group should have at any time.

Name string

The name of the managed identity.

ScalingDownPolicies List<Pulumi.SpotInst.Azure.Inputs.ElastigroupScalingDownPolicyArgs>
ScalingUpPolicies List<Pulumi.SpotInst.Azure.Inputs.ElastigroupScalingUpPolicyArgs>
ScheduledTasks List<Pulumi.SpotInst.Azure.Inputs.ElastigroupScheduledTaskArgs>
ShutdownScript string

Shutdown script for the group. Value should be passed as a string encoded at Base64 only.

UpdatePolicy Pulumi.SpotInst.Azure.Inputs.ElastigroupUpdatePolicyArgs
UserData string

Base64-encoded MIME user data to make available to the instances.

LowPrioritySizes []string

Available Low-Priority sizes.

Network ElastigroupNetwork
OdSizes []string

Available On-Demand sizes

Product string

Operation system type. Valid values: "Linux", "Windows".

Region string

The region your Azure group will be created in.

ResourceGroupName string

The Resource Group that the user-assigned managed identity resides in.

Strategy ElastigroupStrategy

Describes the deployment strategy.

CustomData string
DesiredCapacity int

The desired number of instances the group should have at any time.

HealthCheck ElastigroupHealthCheck
Images []ElastigroupImage
IntegrationKubernetes ElastigroupIntegrationKubernetes
IntegrationMultaiRuntime ElastigroupIntegrationMultaiRuntime
LoadBalancers []ElastigroupLoadBalancer
Login ElastigroupLogin
ManagedServiceIdentities []ElastigroupManagedServiceIdentity
MaxSize int

The maximum number of instances the group should have at any time.

MinSize int

The minimum number of instances the group should have at any time.

Name string

The name of the managed identity.

ScalingDownPolicies []ElastigroupScalingDownPolicy
ScalingUpPolicies []ElastigroupScalingUpPolicy
ScheduledTasks []ElastigroupScheduledTask
ShutdownScript string

Shutdown script for the group. Value should be passed as a string encoded at Base64 only.

UpdatePolicy ElastigroupUpdatePolicy
UserData string

Base64-encoded MIME user data to make available to the instances.

lowPrioritySizes string[]

Available Low-Priority sizes.

network ElastigroupNetwork
odSizes string[]

Available On-Demand sizes

product string

Operation system type. Valid values: "Linux", "Windows".

region string

The region your Azure group will be created in.

resourceGroupName string

The Resource Group that the user-assigned managed identity resides in.

strategy ElastigroupStrategy

Describes the deployment strategy.

customData string
desiredCapacity number

The desired number of instances the group should have at any time.

healthCheck ElastigroupHealthCheck
images ElastigroupImage[]
integrationKubernetes ElastigroupIntegrationKubernetes
integrationMultaiRuntime ElastigroupIntegrationMultaiRuntime
loadBalancers ElastigroupLoadBalancer[]
login ElastigroupLogin
managedServiceIdentities ElastigroupManagedServiceIdentity[]
maxSize number

The maximum number of instances the group should have at any time.

minSize number

The minimum number of instances the group should have at any time.

name string

The name of the managed identity.

scalingDownPolicies ElastigroupScalingDownPolicy[]
scalingUpPolicies ElastigroupScalingUpPolicy[]
scheduledTasks ElastigroupScheduledTask[]
shutdownScript string

Shutdown script for the group. Value should be passed as a string encoded at Base64 only.

updatePolicy ElastigroupUpdatePolicy
userData string

Base64-encoded MIME user data to make available to the instances.

low_priority_sizes List[str]

Available Low-Priority sizes.

network Dict[ElastigroupNetwork]
od_sizes List[str]

Available On-Demand sizes

product str

Operation system type. Valid values: "Linux", "Windows".

region str

The region your Azure group will be created in.

resource_group_name str

The Resource Group that the user-assigned managed identity resides in.

strategy Dict[ElastigroupStrategy]

Describes the deployment strategy.

custom_data str
desired_capacity float

The desired number of instances the group should have at any time.

health_check Dict[ElastigroupHealthCheck]
images List[ElastigroupImage]
integration_kubernetes Dict[ElastigroupIntegrationKubernetes]
integration_multai_runtime Dict[ElastigroupIntegrationMultaiRuntime]
load_balancers List[ElastigroupLoadBalancer]
login Dict[ElastigroupLogin]
managed_service_identities List[ElastigroupManagedServiceIdentity]
max_size float

The maximum number of instances the group should have at any time.

min_size float

The minimum number of instances the group should have at any time.

name str

The name of the managed identity.

scaling_down_policies List[ElastigroupScalingDownPolicy]
scaling_up_policies List[ElastigroupScalingUpPolicy]
scheduled_tasks List[ElastigroupScheduledTask]
shutdown_script str

Shutdown script for the group. Value should be passed as a string encoded at Base64 only.

update_policy Dict[ElastigroupUpdatePolicy]
user_data str

Base64-encoded MIME user data to make available to the instances.

Outputs

All input properties are implicitly available as output properties. Additionally, the Elastigroup resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Elastigroup Resource

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

public static get(name: string, id: Input<ID>, state?: ElastigroupState, opts?: CustomResourceOptions): Elastigroup
static get(resource_name, id, opts=None, custom_data=None, desired_capacity=None, health_check=None, images=None, integration_kubernetes=None, integration_multai_runtime=None, load_balancers=None, login=None, low_priority_sizes=None, managed_service_identities=None, max_size=None, min_size=None, name=None, network=None, od_sizes=None, product=None, region=None, resource_group_name=None, scaling_down_policies=None, scaling_up_policies=None, scheduled_tasks=None, shutdown_script=None, strategy=None, update_policy=None, user_data=None, __props__=None);
func GetElastigroup(ctx *Context, name string, id IDInput, state *ElastigroupState, opts ...ResourceOption) (*Elastigroup, error)
public static Elastigroup Get(string name, Input<string> id, ElastigroupState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

CustomData string
DesiredCapacity int

The desired number of instances the group should have at any time.

HealthCheck Pulumi.SpotInst.Azure.Inputs.ElastigroupHealthCheckArgs
Images List<Pulumi.SpotInst.Azure.Inputs.ElastigroupImageArgs>
IntegrationKubernetes Pulumi.SpotInst.Azure.Inputs.ElastigroupIntegrationKubernetesArgs
IntegrationMultaiRuntime Pulumi.SpotInst.Azure.Inputs.ElastigroupIntegrationMultaiRuntimeArgs
LoadBalancers List<Pulumi.SpotInst.Azure.Inputs.ElastigroupLoadBalancerArgs>
Login Pulumi.SpotInst.Azure.Inputs.ElastigroupLoginArgs
LowPrioritySizes List<string>

Available Low-Priority sizes.

ManagedServiceIdentities List<Pulumi.SpotInst.Azure.Inputs.ElastigroupManagedServiceIdentityArgs>
MaxSize int

The maximum number of instances the group should have at any time.

MinSize int

The minimum number of instances the group should have at any time.

Name string

The name of the managed identity.

Network Pulumi.SpotInst.Azure.Inputs.ElastigroupNetworkArgs
OdSizes List<string>

Available On-Demand sizes

Product string

Operation system type. Valid values: "Linux", "Windows".

Region string

The region your Azure group will be created in.

ResourceGroupName string

The Resource Group that the user-assigned managed identity resides in.

ScalingDownPolicies List<Pulumi.SpotInst.Azure.Inputs.ElastigroupScalingDownPolicyArgs>
ScalingUpPolicies List<Pulumi.SpotInst.Azure.Inputs.ElastigroupScalingUpPolicyArgs>
ScheduledTasks List<Pulumi.SpotInst.Azure.Inputs.ElastigroupScheduledTaskArgs>
ShutdownScript string

Shutdown script for the group. Value should be passed as a string encoded at Base64 only.

Strategy Pulumi.SpotInst.Azure.Inputs.ElastigroupStrategyArgs

Describes the deployment strategy.

UpdatePolicy Pulumi.SpotInst.Azure.Inputs.ElastigroupUpdatePolicyArgs
UserData string

Base64-encoded MIME user data to make available to the instances.

CustomData string
DesiredCapacity int

The desired number of instances the group should have at any time.

HealthCheck ElastigroupHealthCheck
Images []ElastigroupImage
IntegrationKubernetes ElastigroupIntegrationKubernetes
IntegrationMultaiRuntime ElastigroupIntegrationMultaiRuntime
LoadBalancers []ElastigroupLoadBalancer
Login ElastigroupLogin
LowPrioritySizes []string

Available Low-Priority sizes.

ManagedServiceIdentities []ElastigroupManagedServiceIdentity
MaxSize int

The maximum number of instances the group should have at any time.

MinSize int

The minimum number of instances the group should have at any time.

Name string

The name of the managed identity.

Network ElastigroupNetwork
OdSizes []string

Available On-Demand sizes

Product string

Operation system type. Valid values: "Linux", "Windows".

Region string

The region your Azure group will be created in.

ResourceGroupName string

The Resource Group that the user-assigned managed identity resides in.

ScalingDownPolicies []ElastigroupScalingDownPolicy
ScalingUpPolicies []ElastigroupScalingUpPolicy
ScheduledTasks []ElastigroupScheduledTask
ShutdownScript string

Shutdown script for the group. Value should be passed as a string encoded at Base64 only.

Strategy ElastigroupStrategy

Describes the deployment strategy.

UpdatePolicy ElastigroupUpdatePolicy
UserData string

Base64-encoded MIME user data to make available to the instances.

customData string
desiredCapacity number

The desired number of instances the group should have at any time.

healthCheck ElastigroupHealthCheck
images ElastigroupImage[]
integrationKubernetes ElastigroupIntegrationKubernetes
integrationMultaiRuntime ElastigroupIntegrationMultaiRuntime
loadBalancers ElastigroupLoadBalancer[]
login ElastigroupLogin
lowPrioritySizes string[]

Available Low-Priority sizes.

managedServiceIdentities ElastigroupManagedServiceIdentity[]
maxSize number

The maximum number of instances the group should have at any time.

minSize number

The minimum number of instances the group should have at any time.

name string

The name of the managed identity.

network ElastigroupNetwork
odSizes string[]

Available On-Demand sizes

product string

Operation system type. Valid values: "Linux", "Windows".

region string

The region your Azure group will be created in.

resourceGroupName string

The Resource Group that the user-assigned managed identity resides in.

scalingDownPolicies ElastigroupScalingDownPolicy[]
scalingUpPolicies ElastigroupScalingUpPolicy[]
scheduledTasks ElastigroupScheduledTask[]
shutdownScript string

Shutdown script for the group. Value should be passed as a string encoded at Base64 only.

strategy ElastigroupStrategy

Describes the deployment strategy.

updatePolicy ElastigroupUpdatePolicy
userData string

Base64-encoded MIME user data to make available to the instances.

custom_data str
desired_capacity float

The desired number of instances the group should have at any time.

health_check Dict[ElastigroupHealthCheck]
images List[ElastigroupImage]
integration_kubernetes Dict[ElastigroupIntegrationKubernetes]
integration_multai_runtime Dict[ElastigroupIntegrationMultaiRuntime]
load_balancers List[ElastigroupLoadBalancer]
login Dict[ElastigroupLogin]
low_priority_sizes List[str]

Available Low-Priority sizes.

managed_service_identities List[ElastigroupManagedServiceIdentity]
max_size float

The maximum number of instances the group should have at any time.

min_size float

The minimum number of instances the group should have at any time.

name str

The name of the managed identity.

network Dict[ElastigroupNetwork]
od_sizes List[str]

Available On-Demand sizes

product str

Operation system type. Valid values: "Linux", "Windows".

region str

The region your Azure group will be created in.

resource_group_name str

The Resource Group that the user-assigned managed identity resides in.

scaling_down_policies List[ElastigroupScalingDownPolicy]
scaling_up_policies List[ElastigroupScalingUpPolicy]
scheduled_tasks List[ElastigroupScheduledTask]
shutdown_script str

Shutdown script for the group. Value should be passed as a string encoded at Base64 only.

strategy Dict[ElastigroupStrategy]

Describes the deployment strategy.

update_policy Dict[ElastigroupUpdatePolicy]
user_data str

Base64-encoded MIME user data to make available to the instances.

Supporting Types

ElastigroupHealthCheck

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

HealthCheckType string
AutoHealing bool
GracePeriod int
HealthCheckType string
AutoHealing bool
GracePeriod int
healthCheckType string
autoHealing boolean
gracePeriod number
health_check_type str
auto_healing bool
grace_period float

ElastigroupImage

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Customs List<Pulumi.SpotInst.Azure.Inputs.ElastigroupImageCustomArgs>
Marketplaces List<Pulumi.SpotInst.Azure.Inputs.ElastigroupImageMarketplaceArgs>
Customs []ElastigroupImageCustom
Marketplaces []ElastigroupImageMarketplace
customs ElastigroupImageCustom[]
marketplaces ElastigroupImageMarketplace[]
customs List[ElastigroupImageCustom]
marketplaces List[ElastigroupImageMarketplace]

ElastigroupImageCustom

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

ImageName string
ResourceGroupName string

The Resource Group that the user-assigned managed identity resides in.

ImageName string
ResourceGroupName string

The Resource Group that the user-assigned managed identity resides in.

imageName string
resourceGroupName string

The Resource Group that the user-assigned managed identity resides in.

imageName str
resource_group_name str

The Resource Group that the user-assigned managed identity resides in.

ElastigroupImageMarketplace

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Offer string
Publisher string
Sku string
Offer string
Publisher string
Sku string
offer string
publisher string
sku string
offer str
publisher str
sku str

ElastigroupIntegrationKubernetes

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

ClusterIdentifier string
ClusterIdentifier string
clusterIdentifier string
clusterIdentifier str

ElastigroupIntegrationMultaiRuntime

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

DeploymentId string
DeploymentId string
deploymentId string
deployment_id str

ElastigroupLoadBalancer

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Type string
AutoWeight bool
BalancerId string
TargetSetId string
Type string
AutoWeight bool
BalancerId string
TargetSetId string
type string
autoWeight boolean
balancerId string
targetSetId string
type str
autoWeight bool
balancer_id str
target_set_id str

ElastigroupLogin

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

UserName string
Password string
SshPublicKey string
UserName string
Password string
SshPublicKey string
userName string
password string
sshPublicKey string
userName str
password str
sshPublicKey str

ElastigroupManagedServiceIdentity

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the managed identity.

ResourceGroupName string

The Resource Group that the user-assigned managed identity resides in.

Name string

The name of the managed identity.

ResourceGroupName string

The Resource Group that the user-assigned managed identity resides in.

name string

The name of the managed identity.

resourceGroupName string

The Resource Group that the user-assigned managed identity resides in.

name str

The name of the managed identity.

resource_group_name str

The Resource Group that the user-assigned managed identity resides in.

ElastigroupNetwork

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

ResourceGroupName string

The Resource Group that the user-assigned managed identity resides in.

SubnetName string
VirtualNetworkName string
AdditionalIpConfigs List<Pulumi.SpotInst.Azure.Inputs.ElastigroupNetworkAdditionalIpConfigArgs>
AssignPublicIp bool
ResourceGroupName string

The Resource Group that the user-assigned managed identity resides in.

SubnetName string
VirtualNetworkName string
AdditionalIpConfigs []ElastigroupNetworkAdditionalIpConfig
AssignPublicIp bool
resourceGroupName string

The Resource Group that the user-assigned managed identity resides in.

subnetName string
virtualNetworkName string
additionalIpConfigs ElastigroupNetworkAdditionalIpConfig[]
assignPublicIp boolean
resource_group_name str

The Resource Group that the user-assigned managed identity resides in.

subnetName str
virtualNetworkName str
additionalIpConfigs List[ElastigroupNetworkAdditionalIpConfig]
assignPublicIp bool

ElastigroupNetworkAdditionalIpConfig

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the managed identity.

PrivateIpVersion string
Name string

The name of the managed identity.

PrivateIpVersion string
name string

The name of the managed identity.

privateIpVersion string
name str

The name of the managed identity.

privateIpVersion str

ElastigroupScalingDownPolicy

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

MetricName string
Namespace string
PolicyName string
Threshold double
ActionType string
Adjustment string
Cooldown int
Dimensions List<Pulumi.SpotInst.Azure.Inputs.ElastigroupScalingDownPolicyDimensionArgs>
EvaluationPeriods int
MaxTargetCapacity string
Maximum string
MinTargetCapacity string
Minimum string
Operator string
Period int
Statistic string
Target string
Unit string
MetricName string
Namespace string
PolicyName string
Threshold float64
ActionType string
Adjustment string
Cooldown int
Dimensions []ElastigroupScalingDownPolicyDimension
EvaluationPeriods int
MaxTargetCapacity string
Maximum string
MinTargetCapacity string
Minimum string
Operator string
Period int
Statistic string
Target string
Unit string
metricName string
namespace string
policyName string
threshold number
actionType string
adjustment string
cooldown number
dimensions ElastigroupScalingDownPolicyDimension[]
evaluationPeriods number
maxTargetCapacity string
maximum string
minTargetCapacity string
minimum string
operator string
period number
statistic string
target string
unit string
metricName str
namespace str
policyName str
threshold float
actionType str
adjustment str
cooldown float
dimensions List[ElastigroupScalingDownPolicyDimension]
evaluationPeriods float
maxTargetCapacity str
maximum str
minTargetCapacity str
minimum str
operator str
period float
statistic str
target str
unit str

ElastigroupScalingDownPolicyDimension

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the managed identity.

Value string
Name string

The name of the managed identity.

Value string
name string

The name of the managed identity.

value string
name str

The name of the managed identity.

value str

ElastigroupScalingUpPolicy

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

MetricName string
Namespace string
PolicyName string
Threshold double
ActionType string
Adjustment string
Cooldown int
Dimensions List<Pulumi.SpotInst.Azure.Inputs.ElastigroupScalingUpPolicyDimensionArgs>
EvaluationPeriods int
MaxTargetCapacity string
Maximum string
MinTargetCapacity string
Minimum string
Operator string
Period int
Statistic string
Target string
Unit string
MetricName string
Namespace string
PolicyName string
Threshold float64
ActionType string
Adjustment string
Cooldown int
Dimensions []ElastigroupScalingUpPolicyDimension
EvaluationPeriods int
MaxTargetCapacity string
Maximum string
MinTargetCapacity string
Minimum string
Operator string
Period int
Statistic string
Target string
Unit string
metricName string
namespace string
policyName string
threshold number
actionType string
adjustment string
cooldown number
dimensions ElastigroupScalingUpPolicyDimension[]
evaluationPeriods number
maxTargetCapacity string
maximum string
minTargetCapacity string
minimum string
operator string
period number
statistic string
target string
unit string
metricName str
namespace str
policyName str
threshold float
actionType str
adjustment str
cooldown float
dimensions List[ElastigroupScalingUpPolicyDimension]
evaluationPeriods float
maxTargetCapacity str
maximum str
minTargetCapacity str
minimum str
operator str
period float
statistic str
target str
unit str

ElastigroupScalingUpPolicyDimension

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the managed identity.

Value string
Name string

The name of the managed identity.

Value string
name string

The name of the managed identity.

value string
name str

The name of the managed identity.

value str

ElastigroupScheduledTask

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

CronExpression string
TaskType string
Adjustment string
AdjustmentPercentage string
BatchSizePercentage string
GracePeriod string
IsEnabled bool
ScaleMaxCapacity string
ScaleMinCapacity string
ScaleTargetCapacity string
CronExpression string
TaskType string
Adjustment string
AdjustmentPercentage string
BatchSizePercentage string
GracePeriod string
IsEnabled bool
ScaleMaxCapacity string
ScaleMinCapacity string
ScaleTargetCapacity string
cronExpression string
taskType string
adjustment string
adjustmentPercentage string
batchSizePercentage string
gracePeriod string
isEnabled boolean
scaleMaxCapacity string
scaleMinCapacity string
scaleTargetCapacity string
cronExpression str
taskType str
adjustment str
adjustmentPercentage str
batchSizePercentage str
grace_period str
isEnabled bool
scaleMaxCapacity str
scaleMinCapacity str
scaleTargetCapacity str

ElastigroupStrategy

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

DrainingTimeout int

Time (seconds) to allow the instance to be drained from incoming TCP connections and detached from MLB before terminating it during a scale-down operation.

LowPriorityPercentage int

Percentage of Low Priority instances to maintain. Required if od_count is not specified.

OdCount int

Number of On-Demand instances to maintain. Required if low_priority_percentage is not specified.

DrainingTimeout int

Time (seconds) to allow the instance to be drained from incoming TCP connections and detached from MLB before terminating it during a scale-down operation.

LowPriorityPercentage int

Percentage of Low Priority instances to maintain. Required if od_count is not specified.

OdCount int

Number of On-Demand instances to maintain. Required if low_priority_percentage is not specified.

drainingTimeout number

Time (seconds) to allow the instance to be drained from incoming TCP connections and detached from MLB before terminating it during a scale-down operation.

lowPriorityPercentage number

Percentage of Low Priority instances to maintain. Required if od_count is not specified.

odCount number

Number of On-Demand instances to maintain. Required if low_priority_percentage is not specified.

draining_timeout float

Time (seconds) to allow the instance to be drained from incoming TCP connections and detached from MLB before terminating it during a scale-down operation.

lowPriorityPercentage float

Percentage of Low Priority instances to maintain. Required if od_count is not specified.

odCount float

Number of On-Demand instances to maintain. Required if low_priority_percentage is not specified.

ElastigroupUpdatePolicy

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

ShouldRoll bool
RollConfig Pulumi.SpotInst.Azure.Inputs.ElastigroupUpdatePolicyRollConfigArgs
ShouldRoll bool
RollConfig ElastigroupUpdatePolicyRollConfig
shouldRoll boolean
rollConfig ElastigroupUpdatePolicyRollConfig
shouldRoll bool
rollConfig Dict[ElastigroupUpdatePolicyRollConfig]

ElastigroupUpdatePolicyRollConfig

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

BatchSizePercentage int
GracePeriod int
HealthCheckType string
BatchSizePercentage int
GracePeriod int
HealthCheckType string
batchSizePercentage number
gracePeriod number
healthCheckType string
batchSizePercentage float
grace_period float
health_check_type str

Package Details

Repository
https://github.com/pulumi/pulumi-spotinst
License
Apache-2.0
Notes
This Pulumi package is based on the spotinst Terraform Provider.