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

}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

my_cluster = alicloud.cs.Swarm("myCluster",
    cidr_block="172.18.0.0/24",
    disk_category="cloud_efficiency",
    disk_size=20,
    image_id=var["image_id"],
    instance_type="ecs.n4.small",
    node_number=2,
    password="Yourpassword1234",
    vswitch_id=var["vswitch_id"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const myCluster = new alicloud.cs.Swarm("my_cluster", {
    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,
});

Create a Swarm Resource

new Swarm(name: string, args: SwarmArgs, opts?: CustomResourceOptions);
def Swarm(resource_name, opts=None, cidr_block=None, disk_category=None, disk_size=None, image_id=None, instance_type=None, is_outdated=None, name=None, name_prefix=None, need_slb=None, node_number=None, password=None, release_eip=None, size=None, vswitch_id=None, __props__=None);
func NewSwarm(ctx *Context, name string, args SwarmArgs, opts ...ResourceOption) (*Swarm, error)
public Swarm(string name, SwarmArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args SwarmArgs
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 SwarmArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SwarmArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Swarm Resource Properties

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

Inputs

The Swarm resource accepts the following input properties:

CidrBlock string

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

InstanceType string

The type of ECS instance node.

Password string

The password of ECS instance node.

VswitchId string

The password of ECS instance node. If it is not specified, the container cluster’s network mode will be Classic.

DiskCategory string

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.

DiskSize int

The data disk size of ECS instance node. Its valid value is 20~32768 GB. Default to 20.

ImageId string

The image ID of ECS instance node used. Default to System automate allocated.

IsOutdated bool

Whether to use outdated instance type. Default to false.

Name string

The container cluster’s name. It is the only in one Alicloud account.

NamePrefix string
NeedSlb bool

Whether to create the default simple routing Server Load Balancer instance for the cluster. The default value is true.

NodeNumber int

The ECS node number of the container cluster. Its value choices are 1~50, and default to 1.

ReleaseEip bool

Whether to release EIP after creating swarm cluster successfully. Default to false.

Size int

Field ‘size’ has been deprecated from provider version 1.9.1. New field ‘node_number’ replaces it.

Deprecated: Field 'size' has been deprecated from provider version 1.9.1. New field 'node_number' replaces it.

CidrBlock string

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

InstanceType string

The type of ECS instance node.

Password string

The password of ECS instance node.

VswitchId string

The password of ECS instance node. If it is not specified, the container cluster’s network mode will be Classic.

DiskCategory string

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.

DiskSize int

The data disk size of ECS instance node. Its valid value is 20~32768 GB. Default to 20.

ImageId string

The image ID of ECS instance node used. Default to System automate allocated.

IsOutdated bool

Whether to use outdated instance type. Default to false.

Name string

The container cluster’s name. It is the only in one Alicloud account.

NamePrefix string
NeedSlb bool

Whether to create the default simple routing Server Load Balancer instance for the cluster. The default value is true.

NodeNumber int

The ECS node number of the container cluster. Its value choices are 1~50, and default to 1.

ReleaseEip bool

Whether to release EIP after creating swarm cluster successfully. Default to false.

Size int

Field ‘size’ has been deprecated from provider version 1.9.1. New field ‘node_number’ replaces it.

Deprecated: Field 'size' has been deprecated from provider version 1.9.1. New field 'node_number' replaces it.

cidrBlock string

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

instanceType string

The type of ECS instance node.

password string

The password of ECS instance node.

vswitchId string

The password of ECS instance node. If it is not specified, the container cluster’s network mode will be Classic.

diskCategory string

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.

diskSize number

The data disk size of ECS instance node. Its valid value is 20~32768 GB. Default to 20.

imageId string

The image ID of ECS instance node used. Default to System automate allocated.

isOutdated boolean

Whether to use outdated instance type. Default to false.

name string

The container cluster’s name. It is the only in one Alicloud account.

namePrefix string
needSlb boolean

Whether to create the default simple routing Server Load Balancer instance for the cluster. The default value is true.

nodeNumber number

The ECS node number of the container cluster. Its value choices are 1~50, and default to 1.

releaseEip boolean

Whether to release EIP after creating swarm cluster successfully. Default to false.

size number

Field ‘size’ has been deprecated from provider version 1.9.1. New field ‘node_number’ replaces it.

Deprecated: Field 'size' has been deprecated from provider version 1.9.1. New field 'node_number' replaces it.

cidr_block str

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

instance_type str

The type of ECS instance node.

password str

The password of ECS instance node.

vswitch_id str

The password of ECS instance node. If it is not specified, the container cluster’s network mode will be Classic.

disk_category str

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.

disk_size float

The data disk size of ECS instance node. Its valid value is 20~32768 GB. Default to 20.

image_id str

The image ID of ECS instance node used. Default to System automate allocated.

is_outdated bool

Whether to use outdated instance type. Default to false.

name str

The container cluster’s name. It is the only in one Alicloud account.

name_prefix str
need_slb bool

Whether to create the default simple routing Server Load Balancer instance for the cluster. The default value is true.

node_number float

The ECS node number of the container cluster. Its value choices are 1~50, and default to 1.

release_eip bool

Whether to release EIP after creating swarm cluster successfully. Default to false.

size float

Field ‘size’ has been deprecated from provider version 1.9.1. New field ‘node_number’ replaces it.

Deprecated: Field 'size' has been deprecated from provider version 1.9.1. New field 'node_number' replaces it.

Outputs

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

AgentVersion string

The nodes agent version.

Id string
The provider-assigned unique ID for this managed resource.
Nodes List<Pulumi.AliCloud.CS.Outputs.SwarmNode>

List of cluster nodes. It contains several attributes to Block Nodes.

SecurityGroupId string

The ID of security group where the current cluster worker node is located.

SlbId string

The ID of load balancer where the current cluster worker node is located.

VpcId string

The ID of VPC where the current cluster is located.

AgentVersion string

The nodes agent version.

Id string
The provider-assigned unique ID for this managed resource.
Nodes []SwarmNode

List of cluster nodes. It contains several attributes to Block Nodes.

SecurityGroupId string

The ID of security group where the current cluster worker node is located.

SlbId string

The ID of load balancer where the current cluster worker node is located.

VpcId string

The ID of VPC where the current cluster is located.

agentVersion string

The nodes agent version.

id string
The provider-assigned unique ID for this managed resource.
nodes SwarmNode[]

List of cluster nodes. It contains several attributes to Block Nodes.

securityGroupId string

The ID of security group where the current cluster worker node is located.

slbId string

The ID of load balancer where the current cluster worker node is located.

vpcId string

The ID of VPC where the current cluster is located.

agent_version str

The nodes agent version.

id str
The provider-assigned unique ID for this managed resource.
nodes List[SwarmNode]

List of cluster nodes. It contains several attributes to Block Nodes.

security_group_id str

The ID of security group where the current cluster worker node is located.

slb_id str

The ID of load balancer where the current cluster worker node is located.

vpc_id str

The ID of VPC where the current cluster is located.

Look up an Existing Swarm Resource

Get an existing Swarm 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?: SwarmState, opts?: CustomResourceOptions): Swarm
static get(resource_name, id, opts=None, agent_version=None, cidr_block=None, disk_category=None, disk_size=None, image_id=None, instance_type=None, is_outdated=None, name=None, name_prefix=None, need_slb=None, node_number=None, nodes=None, password=None, release_eip=None, security_group_id=None, size=None, slb_id=None, vpc_id=None, vswitch_id=None, __props__=None);
func GetSwarm(ctx *Context, name string, id IDInput, state *SwarmState, opts ...ResourceOption) (*Swarm, error)
public static Swarm Get(string name, Input<string> id, SwarmState? 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:

AgentVersion string

The nodes agent version.

CidrBlock string

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

DiskCategory string

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.

DiskSize int

The data disk size of ECS instance node. Its valid value is 20~32768 GB. Default to 20.

ImageId string

The image ID of ECS instance node used. Default to System automate allocated.

InstanceType string

The type of ECS instance node.

IsOutdated bool

Whether to use outdated instance type. Default to false.

Name string

The container cluster’s name. It is the only in one Alicloud account.

NamePrefix string
NeedSlb bool

Whether to create the default simple routing Server Load Balancer instance for the cluster. The default value is true.

NodeNumber int

The ECS node number of the container cluster. Its value choices are 1~50, and default to 1.

Nodes List<Pulumi.AliCloud.CS.Inputs.SwarmNodeArgs>

List of cluster nodes. It contains several attributes to Block Nodes.

Password string

The password of ECS instance node.

ReleaseEip bool

Whether to release EIP after creating swarm cluster successfully. Default to false.

SecurityGroupId string

The ID of security group where the current cluster worker node is located.

Size int

Field ‘size’ has been deprecated from provider version 1.9.1. New field ‘node_number’ replaces it.

Deprecated: Field 'size' has been deprecated from provider version 1.9.1. New field 'node_number' replaces it.

SlbId string

The ID of load balancer where the current cluster worker node is located.

VpcId string

The ID of VPC where the current cluster is located.

VswitchId string

The password of ECS instance node. If it is not specified, the container cluster’s network mode will be Classic.

AgentVersion string

The nodes agent version.

CidrBlock string

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

DiskCategory string

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.

DiskSize int

The data disk size of ECS instance node. Its valid value is 20~32768 GB. Default to 20.

ImageId string

The image ID of ECS instance node used. Default to System automate allocated.

InstanceType string

The type of ECS instance node.

IsOutdated bool

Whether to use outdated instance type. Default to false.

Name string

The container cluster’s name. It is the only in one Alicloud account.

NamePrefix string
NeedSlb bool

Whether to create the default simple routing Server Load Balancer instance for the cluster. The default value is true.

NodeNumber int

The ECS node number of the container cluster. Its value choices are 1~50, and default to 1.

Nodes []SwarmNode

List of cluster nodes. It contains several attributes to Block Nodes.

Password string

The password of ECS instance node.

ReleaseEip bool

Whether to release EIP after creating swarm cluster successfully. Default to false.

SecurityGroupId string

The ID of security group where the current cluster worker node is located.

Size int

Field ‘size’ has been deprecated from provider version 1.9.1. New field ‘node_number’ replaces it.

Deprecated: Field 'size' has been deprecated from provider version 1.9.1. New field 'node_number' replaces it.

SlbId string

The ID of load balancer where the current cluster worker node is located.

VpcId string

The ID of VPC where the current cluster is located.

VswitchId string

The password of ECS instance node. If it is not specified, the container cluster’s network mode will be Classic.

agentVersion string

The nodes agent version.

cidrBlock string

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

diskCategory string

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.

diskSize number

The data disk size of ECS instance node. Its valid value is 20~32768 GB. Default to 20.

imageId string

The image ID of ECS instance node used. Default to System automate allocated.

instanceType string

The type of ECS instance node.

isOutdated boolean

Whether to use outdated instance type. Default to false.

name string

The container cluster’s name. It is the only in one Alicloud account.

namePrefix string
needSlb boolean

Whether to create the default simple routing Server Load Balancer instance for the cluster. The default value is true.

nodeNumber number

The ECS node number of the container cluster. Its value choices are 1~50, and default to 1.

nodes SwarmNode[]

List of cluster nodes. It contains several attributes to Block Nodes.

password string

The password of ECS instance node.

releaseEip boolean

Whether to release EIP after creating swarm cluster successfully. Default to false.

securityGroupId string

The ID of security group where the current cluster worker node is located.

size number

Field ‘size’ has been deprecated from provider version 1.9.1. New field ‘node_number’ replaces it.

Deprecated: Field 'size' has been deprecated from provider version 1.9.1. New field 'node_number' replaces it.

slbId string

The ID of load balancer where the current cluster worker node is located.

vpcId string

The ID of VPC where the current cluster is located.

vswitchId string

The password of ECS instance node. If it is not specified, the container cluster’s network mode will be Classic.

agent_version str

The nodes agent version.

cidr_block str

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

disk_category str

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.

disk_size float

The data disk size of ECS instance node. Its valid value is 20~32768 GB. Default to 20.

image_id str

The image ID of ECS instance node used. Default to System automate allocated.

instance_type str

The type of ECS instance node.

is_outdated bool

Whether to use outdated instance type. Default to false.

name str

The container cluster’s name. It is the only in one Alicloud account.

name_prefix str
need_slb bool

Whether to create the default simple routing Server Load Balancer instance for the cluster. The default value is true.

node_number float

The ECS node number of the container cluster. Its value choices are 1~50, and default to 1.

nodes List[SwarmNode]

List of cluster nodes. It contains several attributes to Block Nodes.

password str

The password of ECS instance node.

release_eip bool

Whether to release EIP after creating swarm cluster successfully. Default to false.

security_group_id str

The ID of security group where the current cluster worker node is located.

size float

Field ‘size’ has been deprecated from provider version 1.9.1. New field ‘node_number’ replaces it.

Deprecated: Field 'size' has been deprecated from provider version 1.9.1. New field 'node_number' replaces it.

slb_id str

The ID of load balancer where the current cluster worker node is located.

vpc_id str

The ID of VPC where the current cluster is located.

vswitch_id str

The password of ECS instance node. If it is not specified, the container cluster’s network mode will be Classic.

Supporting Types

SwarmNode

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Eip string

The Elastic IP address of node.

Id string

ID of the node.

Name string

The container cluster’s name. It is the only in one Alicloud account.

PrivateIp string

The private IP address of node.

Status string

The node current status. It is different with instance status.

Eip string

The Elastic IP address of node.

Id string

ID of the node.

Name string

The container cluster’s name. It is the only in one Alicloud account.

PrivateIp string

The private IP address of node.

Status string

The node current status. It is different with instance status.

eip string

The Elastic IP address of node.

id string

ID of the node.

name string

The container cluster’s name. It is the only in one Alicloud account.

privateIp string

The private IP address of node.

status string

The node current status. It is different with instance status.

eip str

The Elastic IP address of node.

id str

ID of the node.

name str

The container cluster’s name. It is the only in one Alicloud account.

private_ip str

The private IP address of node.

status str

The node current status. It is different with instance status.

Package Details

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