-
Notifications
You must be signed in to change notification settings - Fork 0
/
spotinst_ocean.tf
53 lines (48 loc) · 1.41 KB
/
spotinst_ocean.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
# Create an Elastigroup
resource "spotinst_ocean_aws" "ocean_cluster" {
name = "${var.ocean_cluster_name}"
controller_id = "${var.controller_id}"
region = "${var.region}"
max_size = "${var.max_size}"
min_size = "${var.min_size}"
desired_capacity = "${var.desired_capacity}"
whitelist = "${var.permitted_ec2_types}"
# ["t2.large", "m5.large"]
# subnet_ids = ["${module.vpc.private_subnets}"]
subnet_ids = "${var.subnets}"
image_id = "${var.ami}"
security_groups = ["${aws_security_group.all_worker_mgmt.id}", "${module.eks.worker_security_group_id}"]
key_name = "${var.key_name}"
associate_public_ip_address = true
user_data = <<-EOF
#!/bin/bash
set -o xtrace
/etc/eks/bootstrap.sh ${var.cluster_name}
EOF
iam_instance_profile = "${aws_iam_instance_profile.workers.arn}"
tags = [
{
key = "Name"
value = "${var.cluster_name}-ocean_cluster-Node"
},
{
key = "kubernetes.io/cluster/${var.cluster_name}"
value = "owned"
},
]
autoscaler = {
autoscale_is_enabled = true
autoscale_is_auto_config = false
autoscale_cooldown = 300
autoscale_down = {
evaluation_periods = 300
}
resource_limits = {
max_vcpu = 1000
max_memory_gib = 2000
}
}
depends_on = ["module.eks"]
}
*/