From cf8e8779bea396370e9fced29e0639db7d32b66a Mon Sep 17 00:00:00 2001 From: Andrew Lavery Date: Thu, 19 Jul 2018 10:32:22 -0700 Subject: [PATCH] add 'worker_group_count' to readme and example --- README.md | 1 + examples/eks_test_fixture/main.tf | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b5859a8..5285b28 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,7 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a | subnets | A list of subnets to place the EKS cluster and workers within. | list | - | yes | | tags | A map of tags to add to all resources. | map | `` | no | | vpc_id | VPC where the cluster and workers will be deployed. | string | - | yes | +| worker_group_count | The number of maps contained within the worker_groups list. | string | `1` | no | | worker_groups | A list of maps defining worker group configurations. See workers_group_defaults for valid keys. | list | `` | no | | worker_security_group_id | If provided, all workers will be attached to this security group. If not given, a security group will be created with necessary ingres/egress to work with the EKS cluster. | string | `` | no | | worker_sg_ingress_from_port | Minimum port number from which pods will accept communication. Must be changed to a lower value if some pods in your cluster will expose a port lower than 1025 (e.g. 22, 80, or 443). | string | `1025` | no | diff --git a/examples/eks_test_fixture/main.tf b/examples/eks_test_fixture/main.tf index 6134a27..b4ef39c 100644 --- a/examples/eks_test_fixture/main.tf +++ b/examples/eks_test_fixture/main.tf @@ -24,12 +24,14 @@ locals { # "asg_min_size", "2", # "instance_type", "m4.xlarge", # "name", "worker_group_a", + # "subnets", "${join(",", module.vpc.private_subnets)}", # ), # map("asg_desired_capacity", "1", # "asg_max_size", "5", # "asg_min_size", "1", # "instance_type", "m4.2xlarge", # "name", "worker_group_b", + # "subnets", "${join(",", module.vpc.private_subnets)}", # ), # )}" @@ -64,13 +66,14 @@ module "vpc" { } module "eks" { - source = "../.." - cluster_name = "${local.cluster_name}" - subnets = "${module.vpc.public_subnets}" - tags = "${local.tags}" - vpc_id = "${module.vpc.vpc_id}" - worker_groups = "${local.worker_groups}" - map_roles = "${var.map_roles}" - map_users = "${var.map_users}" - map_accounts = "${var.map_accounts}" + source = "../.." + cluster_name = "${local.cluster_name}" + subnets = "${module.vpc.public_subnets}" + tags = "${local.tags}" + vpc_id = "${module.vpc.vpc_id}" + worker_groups = "${local.worker_groups}" + worker_group_count = "1" + map_roles = "${var.map_roles}" + map_users = "${var.map_users}" + map_accounts = "${var.map_accounts}" }