mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-20 08:33:46 +01:00
Cleaning up and deduplicating launch template related code (#370)
* cleaning up launch template code * update changelog * Remove variable worker_group_launch_template_tags * misc fixes * fixing and simplifying example
This commit is contained in:
@@ -61,24 +61,17 @@ locals {
|
||||
|
||||
worker_groups = [
|
||||
{
|
||||
# This will launch an autoscaling group with only On-Demand instances
|
||||
instance_type = "t2.small"
|
||||
additional_userdata = "echo foo bar"
|
||||
subnets = "${join(",", module.vpc.private_subnets)}"
|
||||
asg_desired_capacity = "2"
|
||||
asg_desired_capacity = 2
|
||||
},
|
||||
]
|
||||
worker_groups_launch_template = [
|
||||
{
|
||||
# This will launch an autoscaling group with only Spot Fleet instances
|
||||
instance_type = "t2.small"
|
||||
additional_userdata = "echo foo bar"
|
||||
subnets = "${join(",", module.vpc.private_subnets)}"
|
||||
additional_security_group_ids = "${aws_security_group.worker_group_mgmt_one.id},${aws_security_group.worker_group_mgmt_two.id}"
|
||||
override_instance_type = "t3.small"
|
||||
asg_desired_capacity = "2"
|
||||
spot_instance_pools = 10
|
||||
on_demand_percentage_above_base_capacity = "0"
|
||||
instance_type = "t2.small"
|
||||
additional_userdata = "echo foo bar"
|
||||
additional_security_group_ids = "${aws_security_group.worker_group_mgmt_one.id},${aws_security_group.worker_group_mgmt_two.id}"
|
||||
asg_desired_capacity = 2
|
||||
},
|
||||
]
|
||||
tags = {
|
||||
@@ -163,8 +156,8 @@ module "eks" {
|
||||
vpc_id = "${module.vpc.vpc_id}"
|
||||
worker_groups = "${local.worker_groups}"
|
||||
worker_groups_launch_template = "${local.worker_groups_launch_template}"
|
||||
worker_group_count = "1"
|
||||
worker_group_launch_template_count = "1"
|
||||
worker_group_count = 1
|
||||
worker_group_launch_template_count = 1
|
||||
worker_additional_security_group_ids = ["${aws_security_group.all_worker_mgmt.id}"]
|
||||
map_roles = "${var.map_roles}"
|
||||
map_roles_count = "${var.map_roles_count}"
|
||||
|
||||
Reference in New Issue
Block a user