AWS EC2 Docker Swarm Cluster
This terraform module creates a Docker Swarm cluster using AWS EC2 instances. It optionnally creates a gluster cluster and/or enables an EFS.
Name
Version
aws
~> 2.23
null
n/a
template
n/a
Name
Description
Type
Default
Required
ami
Ubuntu Server 18.04 LTS AMI
string
"ami-09a4a9ce71ff3f20b"
no
availability_zone
The availability zone in which to create EC2 instances
string
"ap-southeast-1a"
no
connect_via_private_address
Whether connection to the servers should be made via the private ip address (true) or the public ip address (false)
bool
false
no
connection_timeout
Timeout for connection to servers
string
"2m"
no
eip_allocation_id
The allocation ID of the Elastic IP address
any
n/a
yes
enable_efs
Set to true in order to enable EFS
bool
false
no
enable_gluster
Set to true in order to enable gluster
bool
false
no
env
The environment of the current deployment
any
n/a
yes
gluster_volume_size
Size of the gluster volume in gibibytes (GiB)
number
1
no
key_pair_name
The name for the key pair
any
n/a
yes
manager_instance_type
Manager instance type
string
"t3a.large"
no
manager_volume_delete_on_termination
Whether root volume should be destroyed on manager instance termination
bool
true
no
manager_volume_size
The size of root volume of manager instance in gibibytes (GiB).
number
8
no
manager_volume_type
The type of root volume of manager intances
string
"gp2"
no
private_key_path
SSH private key path for ssh connection.
string
"~/.ssh/id_rsa"
no
ssh_public_keys
SSH public keys to add to instances
string
""
no
ssh_user
User for logging into nodes (ansible)
string
"ubuntu"
no
subnet_main_cidr
n/a
string
"192.168.0.0/24"
no
swarm_manager_count
Number of manager nodes
number
1
no
swarm_manager_name
Name to use for naming manager nodes
string
"manager"
no
swarm_name
n/a
any
n/a
yes
swarm_worker_count
Number of worker nodes
number
1
no
swarm_worker_name
Name to use for naming worker nodes
string
"worker"
no
vpc_cidr
n/a
string
"192.168.0.0/24"
no
worker_instance_type
Worker instance type
string
"t3a.large"
no
worker_volume_delete_on_termination
Whether root volume should be destroyed on worker instance termination
bool
true
no
worker_volume_size
The size of root volume of worker instance in gibibytes (GiB).
number
8
no
worker_volume_type
The type of root volume of worker intances
string
"gp2"
no
Name
Description
ansible_inventory
Content of Ansible inventory
efs_dns_name
DNS name of the provisioned AWS EFS
swarm_manager_private_ips
The manager nodes private ipv4 adresses
swarm_manager_public_ips
The manager nodes public ipv4 adresses
swarm_worker_private_ips
The worker nodes private ipv4 adresses
swarm_worker_public_ips
The worker nodes public ipv4 adresses