Namespace Pulumi.SpotInst.Azure
Classes
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:"INSTANCE_STATE","NONE".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()
{
}
}