Show / Hide Table of Contents

Class Elastigroup

Provides a Spotinst elastigroup Azure resource.

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 = "",
    });
}

}

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)
using Pulumi;

class MyStack : Stack
{
public MyStack()
{
}

}

<a id="image"></a>

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.
using Pulumi;

class MyStack : Stack
{
public MyStack()
{
}

}

<a id="health-check"></a>

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.
using Pulumi;

class MyStack : Stack
{
public MyStack()
{
}

}

<a id="network"></a>

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.
using Pulumi;

class MyStack : Stack
{
public MyStack()
{
}

}

<a id="login"></a>

Login

using Pulumi;

class MyStack : Stack
{
public MyStack()
{
}

}

<a id="login"></a>

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.
using Pulumi;

class MyStack : Stack
{
public MyStack()
{
}

}

<a id="scaling-policy"></a>

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.
using Pulumi;

class MyStack : Stack
{
public MyStack()
{
}

}

<a id="update-policy"></a>

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: &quot;INSTANCE_STATE&quot;, &quot;NONE&quot;.
    • grace_period - (Optional) Sets the grace period for new instances to become healthy.
using Pulumi;

class MyStack : Stack
{
public MyStack()
{
}

}

<a id="third-party-integrations"></a>

Third-Party Integrations

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

Usage:

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:

using Pulumi;

class MyStack : Stack
{
public MyStack()
{
}

}
Inheritance
System.Object
Resource
CustomResource
Elastigroup
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.SpotInst.Azure
Assembly: Pulumi.SpotInst.dll
Syntax
public class Elastigroup : CustomResource

Constructors

View Source

Elastigroup(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 Source

CustomData

Declaration
public Output<string> CustomData { get; }
Property Value
Type Description
Output<System.String>
View Source

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.Nullable<System.Int32>>
View Source

HealthCheck

Declaration
public Output<ElastigroupHealthCheck> HealthCheck { get; }
Property Value
Type Description
Output<ElastigroupHealthCheck>
View Source

Images

Declaration
public Output<ImmutableArray<ElastigroupImage>> Images { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<ElastigroupImage>>
View Source

IntegrationKubernetes

Declaration
public Output<ElastigroupIntegrationKubernetes> IntegrationKubernetes { get; }
Property Value
Type Description
Output<ElastigroupIntegrationKubernetes>
View Source

IntegrationMultaiRuntime

Declaration
public Output<ElastigroupIntegrationMultaiRuntime> IntegrationMultaiRuntime { get; }
Property Value
Type Description
Output<ElastigroupIntegrationMultaiRuntime>
View Source

LoadBalancers

Declaration
public Output<ImmutableArray<ElastigroupLoadBalancer>> LoadBalancers { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<ElastigroupLoadBalancer>>
View Source

Login

Declaration
public Output<ElastigroupLogin> Login { get; }
Property Value
Type Description
Output<ElastigroupLogin>
View Source

LowPrioritySizes

Available Low-Priority sizes.

Declaration
public Output<ImmutableArray<string>> LowPrioritySizes { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

ManagedServiceIdentities

Declaration
public Output<ImmutableArray<ElastigroupManagedServiceIdentity>> ManagedServiceIdentities { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<ElastigroupManagedServiceIdentity>>
View Source

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>
View Source

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>
View Source

Name

The name of the managed identity.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Network

Declaration
public Output<ElastigroupNetwork> Network { get; }
Property Value
Type Description
Output<ElastigroupNetwork>
View Source

OdSizes

Available On-Demand sizes

Declaration
public Output<ImmutableArray<string>> OdSizes { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Product

Operation system type. Valid values: &quot;Linux&quot;, &quot;Windows&quot;.

Declaration
public Output<string> Product { get; }
Property Value
Type Description
Output<System.String>
View Source

Region

The region your Azure group will be created in.

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

ResourceGroupName

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

Declaration
public Output<string> ResourceGroupName { get; }
Property Value
Type Description
Output<System.String>
View Source

ScalingDownPolicies

Declaration
public Output<ImmutableArray<ElastigroupScalingDownPolicy>> ScalingDownPolicies { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<ElastigroupScalingDownPolicy>>
View Source

ScalingUpPolicies

Declaration
public Output<ImmutableArray<ElastigroupScalingUpPolicy>> ScalingUpPolicies { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<ElastigroupScalingUpPolicy>>
View Source

ScheduledTasks

Declaration
public Output<ImmutableArray<ElastigroupScheduledTask>> ScheduledTasks { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<ElastigroupScheduledTask>>
View Source

ShutdownScript

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

Declaration
public Output<string> ShutdownScript { get; }
Property Value
Type Description
Output<System.String>
View Source

Strategy

Describes the deployment strategy.

Declaration
public Output<ElastigroupStrategy> Strategy { get; }
Property Value
Type Description
Output<ElastigroupStrategy>
View Source

UpdatePolicy

Declaration
public Output<ElastigroupUpdatePolicy> UpdatePolicy { get; }
Property Value
Type Description
Output<ElastigroupUpdatePolicy>
View Source

UserData

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

Declaration
public Output<string> UserData { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.