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);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:
- Cidr
Block 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
- Instance
Type string The type of ECS instance node.
- Password string
The password of ECS instance node.
- Vswitch
Id string The password of ECS instance node. If it is not specified, the container cluster’s network mode will be
Classic.- Disk
Category string The data disk category of ECS instance node. Its valid value are
cloud,cloud_ssd,cloud_essd,ephemeral_essdandcloud_efficiency. Default tocloud_efficiency.- Disk
Size int The data disk size of ECS instance node. Its valid value is 20~32768 GB. Default to 20.
- Image
Id string 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 string
The container cluster’s name. It is the only in one Alicloud account.
- Name
Prefix string - Need
Slb bool Whether to create the default simple routing Server Load Balancer instance for the cluster. The default value is true.
- Node
Number int 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 int
Field ‘size’ has been deprecated from provider version 1.9.1. New field ‘node_number’ replaces it.
- Cidr
Block 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
- Instance
Type string The type of ECS instance node.
- Password string
The password of ECS instance node.
- Vswitch
Id string The password of ECS instance node. If it is not specified, the container cluster’s network mode will be
Classic.- Disk
Category string The data disk category of ECS instance node. Its valid value are
cloud,cloud_ssd,cloud_essd,ephemeral_essdandcloud_efficiency. Default tocloud_efficiency.- Disk
Size int The data disk size of ECS instance node. Its valid value is 20~32768 GB. Default to 20.
- Image
Id string 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 string
The container cluster’s name. It is the only in one Alicloud account.
- Name
Prefix string - Need
Slb bool Whether to create the default simple routing Server Load Balancer instance for the cluster. The default value is true.
- Node
Number int 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 int
Field ‘size’ has been deprecated from provider version 1.9.1. New field ‘node_number’ replaces it.
- cidr
Block 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
- instance
Type string The type of ECS instance node.
- password string
The password of ECS instance node.
- vswitch
Id string The password of ECS instance node. If it is not specified, the container cluster’s network mode will be
Classic.- disk
Category string The data disk category of ECS instance node. Its valid value are
cloud,cloud_ssd,cloud_essd,ephemeral_essdandcloud_efficiency. Default tocloud_efficiency.- disk
Size number The data disk size of ECS instance node. Its valid value is 20~32768 GB. Default to 20.
- image
Id string The image ID of ECS instance node used. Default to System automate allocated.
- is
Outdated 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.
- name
Prefix string - need
Slb boolean Whether to create the default simple routing Server Load Balancer instance for the cluster. The default value is true.
- node
Number number The ECS node number of the container cluster. Its value choices are 1~50, and default to 1.
- release
Eip 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.
- 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_essdandcloud_efficiency. Default tocloud_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.
Outputs
All input properties are implicitly available as output properties. Additionally, the Swarm resource produces the following output properties:
- Agent
Version string The nodes agent version.
- Id string
- The provider-assigned unique ID for this managed resource.
- Nodes
List<Pulumi.
Ali Cloud. CS. Outputs. Swarm Node> List of cluster nodes. It contains several attributes to
Block Nodes.- Security
Group stringId The ID of security group where the current cluster worker node is located.
- Slb
Id string The ID of load balancer where the current cluster worker node is located.
- Vpc
Id string The ID of VPC where the current cluster is located.
- Agent
Version string The nodes agent version.
- Id string
- The provider-assigned unique ID for this managed resource.
- Nodes
[]Swarm
Node List of cluster nodes. It contains several attributes to
Block Nodes.- Security
Group stringId The ID of security group where the current cluster worker node is located.
- Slb
Id string The ID of load balancer where the current cluster worker node is located.
- Vpc
Id string The ID of VPC where the current cluster is located.
- agent
Version string The nodes agent version.
- id string
- The provider-assigned unique ID for this managed resource.
- nodes
Swarm
Node[] List of cluster nodes. It contains several attributes to
Block Nodes.- security
Group stringId The ID of security group where the current cluster worker node is located.
- slb
Id string The ID of load balancer where the current cluster worker node is located.
- vpc
Id 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[Swarm
Node] List of cluster nodes. It contains several attributes to
Block Nodes.- security_
group_ strid 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): Swarmstatic 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:
- Agent
Version string The nodes agent version.
- Cidr
Block 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
- Disk
Category string The data disk category of ECS instance node. Its valid value are
cloud,cloud_ssd,cloud_essd,ephemeral_essdandcloud_efficiency. Default tocloud_efficiency.- Disk
Size int The data disk size of ECS instance node. Its valid value is 20~32768 GB. Default to 20.
- Image
Id string The image ID of ECS instance node used. Default to System automate allocated.
- Instance
Type string The type of ECS instance node.
- Is
Outdated 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.
- Name
Prefix string - Need
Slb bool Whether to create the default simple routing Server Load Balancer instance for the cluster. The default value is true.
- Node
Number int The ECS node number of the container cluster. Its value choices are 1~50, and default to 1.
- Nodes
List<Pulumi.
Ali Cloud. CS. Inputs. Swarm Node Args> List of cluster nodes. It contains several attributes to
Block Nodes.- Password string
The password of ECS instance node.
- Release
Eip bool Whether to release EIP after creating swarm cluster successfully. Default to false.
- Security
Group stringId 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.
- Slb
Id string The ID of load balancer where the current cluster worker node is located.
- Vpc
Id string The ID of VPC where the current cluster is located.
- Vswitch
Id string The password of ECS instance node. If it is not specified, the container cluster’s network mode will be
Classic.
- Agent
Version string The nodes agent version.
- Cidr
Block 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
- Disk
Category string The data disk category of ECS instance node. Its valid value are
cloud,cloud_ssd,cloud_essd,ephemeral_essdandcloud_efficiency. Default tocloud_efficiency.- Disk
Size int The data disk size of ECS instance node. Its valid value is 20~32768 GB. Default to 20.
- Image
Id string The image ID of ECS instance node used. Default to System automate allocated.
- Instance
Type string The type of ECS instance node.
- Is
Outdated 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.
- Name
Prefix string - Need
Slb bool Whether to create the default simple routing Server Load Balancer instance for the cluster. The default value is true.
- Node
Number int The ECS node number of the container cluster. Its value choices are 1~50, and default to 1.
- Nodes
[]Swarm
Node List of cluster nodes. It contains several attributes to
Block Nodes.- Password string
The password of ECS instance node.
- Release
Eip bool Whether to release EIP after creating swarm cluster successfully. Default to false.
- Security
Group stringId 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.
- Slb
Id string The ID of load balancer where the current cluster worker node is located.
- Vpc
Id string The ID of VPC where the current cluster is located.
- Vswitch
Id string The password of ECS instance node. If it is not specified, the container cluster’s network mode will be
Classic.
- agent
Version string The nodes agent version.
- cidr
Block 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
- disk
Category string The data disk category of ECS instance node. Its valid value are
cloud,cloud_ssd,cloud_essd,ephemeral_essdandcloud_efficiency. Default tocloud_efficiency.- disk
Size number The data disk size of ECS instance node. Its valid value is 20~32768 GB. Default to 20.
- image
Id string The image ID of ECS instance node used. Default to System automate allocated.
- instance
Type string The type of ECS instance node.
- is
Outdated 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.
- name
Prefix string - need
Slb boolean Whether to create the default simple routing Server Load Balancer instance for the cluster. The default value is true.
- node
Number number The ECS node number of the container cluster. Its value choices are 1~50, and default to 1.
- nodes
Swarm
Node[] List of cluster nodes. It contains several attributes to
Block Nodes.- password string
The password of ECS instance node.
- release
Eip boolean Whether to release EIP after creating swarm cluster successfully. Default to false.
- security
Group stringId 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.
- slb
Id string The ID of load balancer where the current cluster worker node is located.
- vpc
Id string The ID of VPC where the current cluster is located.
- vswitch
Id 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_essdandcloud_efficiency. Default tocloud_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[Swarm
Node] 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_ strid 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.
- 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.