Class Swarm
DEPRECATED: This resource manages swarm cluster, which is being deprecated and will be replaced by Kubernetes cluster.
This resource will help you to manager a Swarm Cluster.
NOTE: Swarm cluster only supports VPC network and you can specify a VPC network by filed
vswitch_id.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var myCluster = new AliCloud.CS.Swarm("myCluster", new AliCloud.CS.SwarmArgs
{
CidrBlock = "172.18.0.0/24",
DiskCategory = "cloud_efficiency",
DiskSize = 20,
ImageId = @var.Image_id,
InstanceType = "ecs.n4.small",
NodeNumber = 2,
Password = "Yourpassword1234",
VswitchId = @var.Vswitch_id,
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.CS
Assembly: Pulumi.AliCloud.dll
Syntax
public class Swarm : CustomResource
Constructors
View SourceSwarm(String, SwarmArgs, CustomResourceOptions)
Create a Swarm resource with the given unique name, arguments, and options.
Declaration
public Swarm(string name, SwarmArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| SwarmArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAgentVersion
The nodes agent version.
Declaration
public Output<string> AgentVersion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CidrBlock
The CIDR block for the Container. It can not be same as the CIDR used by the VPC. Valid value:
- 192.168.0.0/16
- 172.19-30.0.0/16
- 10.0.0.0/16
Declaration
public Output<string> CidrBlock { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DiskCategory
The data disk category of ECS instance node. Its valid value are cloud, cloud_ssd, cloud_essd, ephemeral_essd and cloud_efficiency. Default to cloud_efficiency.
Declaration
public Output<string> DiskCategory { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DiskSize
The data disk size of ECS instance node. Its valid value is 20~32768 GB. Default to 20.
Declaration
public Output<int?> DiskSize { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
ImageId
The image ID of ECS instance node used. Default to System automate allocated.
Declaration
public Output<string> ImageId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InstanceType
The type of ECS instance node.
Declaration
public Output<string> InstanceType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
IsOutdated
Whether to use outdated instance type. Default to false.
Declaration
public Output<bool?> IsOutdated { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Name
The container cluster's name. It is the only in one Alicloud account.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NamePrefix
Declaration
public Output<string> NamePrefix { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NeedSlb
Whether to create the default simple routing Server Load Balancer instance for the cluster. The default value is true.
Declaration
public Output<bool?> NeedSlb { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
NodeNumber
The ECS node number of the container cluster. Its value choices are 1~50, and default to 1.
Declaration
public Output<int?> NodeNumber { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Nodes
List of cluster nodes. It contains several attributes to Block Nodes.
Declaration
public Output<ImmutableArray<SwarmNode>> Nodes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<SwarmNode>> |
Password
The password of ECS instance node.
Declaration
public Output<string> Password { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ReleaseEip
Whether to release EIP after creating swarm cluster successfully. Default to false.
Declaration
public Output<bool?> ReleaseEip { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
SecurityGroupId
The ID of security group where the current cluster worker node is located.
Declaration
public Output<string> SecurityGroupId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Size
Field 'size' has been deprecated from provider version 1.9.1. New field 'node_number' replaces it.
Declaration
public Output<int?> Size { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
SlbId
The ID of load balancer where the current cluster worker node is located.
Declaration
public Output<string> SlbId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VpcId
The ID of VPC where the current cluster is located.
Declaration
public Output<string> VpcId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VswitchId
The password of ECS instance node. If it is not specified, the container cluster's network mode will be Classic.
Declaration
public Output<string> VswitchId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, SwarmState, CustomResourceOptions)
Get an existing Swarm resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Swarm Get(string name, Input<string> id, SwarmState 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. |
| SwarmState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Swarm |