Commit Graph

99 Commits

Author SHA1 Message Date
Jay
76537d1b8d feat: Use gp3 as default as it saves 20% and is more performant (#1134)
BREAKING CHANGES: The default root volume type is now `gp3` as it saves 20% and is more performant
2021-01-28 22:52:10 +01:00
Siddarth Prakash
7d6e672303 feat: Add support for throughput parameter for gp3 volumes (#1146) 2020-12-22 16:26:47 +01:00
svaranasi-traderev
ccacc17792 feat: Add customizable Auto Scaling Group health check type (#1118) 2020-12-22 11:55:43 +01:00
Thierno IB. BARRY
571da60aea fix: Change the default launch_template_id to null for Managed Node Groups (#1088) 2020-11-07 22:29:24 +01:00
huddy
bba7c151c8 feat: Tags passed into worker groups override tags from var.tags for Autoscaling Groups (#1092)
NOTES: Tags that are passed into `var.worker_groups_launch_template` or `var.worker_groups` now override tags passed in via `var.tags` for Autoscaling Groups only. This allow ASG Tags to be overwritten, so that `propagate_at_launch` can be tweaked for a particular key.
2020-11-07 22:20:22 +01:00
philicious
127a3a8831 feat: Add Launch Template support for Managed Node Groups (#997)
NOTES: Managed Node Groups now support Launch Templates. The Launch Template it self is not managed by this module, so you have to create it by your self and pass it's id to this module. See docs and [`examples/launch_templates_with_managed_node_groups/`](https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/examples/launch_templates_with_managed_node_group) for more details.
2020-11-02 08:19:10 +01:00
Thierno IB. BARRY
d97edde9cd fix: Use splat syntax to avoid errors during destroy with an empty state (#1041) 2020-10-12 21:59:29 +02:00
hacker65536
8c8f4b56eb feat: Add load_balancers parameter to associate a CLB (Classic Load Balancer) to worker groups ASG (#992) 2020-10-05 15:07:57 +02:00
Lorenzo Aiello
f0ae6c6751 feat: Dynamic Partition for IRSA to support AWS-CN Deployments (#1028) 2020-10-04 20:49:41 +02:00
Giuseppe Crinò
1c81227044 docs: Describe key_name is about AWS EC2 key pairs (#970) 2020-08-14 15:27:46 +02:00
Daniel Quackenbush
23ad497557 feat: IMDSv2 metadata configuration in Launch Templates (#938)
NOTES: Addition of the IMDSv2 metadata configuration block to Launch Templates will cause a diff to be generated for existing Launch Templates on first Terraform apply. The defaults match existing behaviour.
2020-07-12 18:25:48 +02:00
Michael Potter
b0ebef69b3 fix: Strip user Name tag from asg_tags #946) 2020-07-12 17:40:27 +02:00
Daniel Piddock
7de18cd9cd fix: Revert removal of templates provider (#883)
Broke use case of passing in custom template content. Reverts most of the following PRs:
- #865
- #863 
- #854
2020-06-05 10:34:23 +02:00
Simon Gurcke
3fefc2a66c feat: Allow communication between pods on workers and pods using the primary cluster security group (optional) (#892)
NOTES: New variable `worker_create_cluster_primary_security_group_rules` to allow communication between pods on workers and pods using the primary cluster security group (Managed Node Groups or Fargate). It defaults to `false` to avoid potential conflicts with existing security group rules users may have implemented.
2020-05-30 22:43:26 +02:00
Daniel Piddock
bb822a1e56 fix: Fix Launch Templates error with aws 2.61.0 (#875) 2020-05-09 19:58:38 +02:00
Thierno IB. BARRY
9bfdba9fb8 chore: Move all locals in locals.tf (#865) 2020-05-06 14:00:20 +02:00
Albert Lloveras
4cc5753284 improvement: Use aws_partition to build IAM policy ARNs (#820)
* Use aws_partition to build IAM policy ARNs

* Update broken link to CONTRIBUTING.md in README.md
2020-03-30 16:09:41 +02:00
Jaime Hidalgo García
de00694a63 feat: Add support for additional volumes in launch templates and launch configurations (#800)
Co-authored-by: Jaime Hidalgo <jhidalgo@cccis.com>
Co-authored-by: Thierno IB. BARRY <ibrahima.br@gmail.com>
2020-03-24 23:28:59 +01:00
Christian Kemper
2a8e45fe2c defaults lookup before falling back on default ami based on platform (#756)
* defaulting to data lookup if worker_group_defaults have no ami_id entry

* using coalesce instead of lookup and also using local instead of var.

* adding defaults support for specifying windows based amis
2020-03-12 00:34:21 +01:00
Arie Lev
f465e55721 Add ASG cooldown and health_check_grace_period (#770)
* Add default_cooldown/health_check oprions

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-Authored-By: Thierno IB. BARRY <ibrahima.br@gmail.com>

Co-authored-by: Thierno IB. BARRY <ibrahima.br@gmail.com>
2020-03-10 11:20:11 +01:00
Siddarth Prakash
198294c0b6 Add support for ASG max instance lifetime (#769)
Co-authored-by: Thierno IB. BARRY <ibrahima.br@gmail.com>
2020-03-09 23:31:52 +01:00
Craig Rueda
6784824595 'root_encrypted' -> bool (#766) 2020-03-09 23:25:05 +01:00
Yecheng Fu
8382f2c4e8 use the correct policy arns if the region is in CN (#765) 2020-03-09 16:02:53 +01:00
Ryan Ooi
f2cc9f5039 Revert #631. Add back manage security group flag (#722)
* Revert #631

* fix README lint

* fix README lint for bool
2020-02-27 11:23:41 +01:00
Max Williams
626a393ab9 Remove of autoscaling IAM policy related stuff (#716)
* Disable management of autoscaling IAM policy by default

* remove completely

* update changelog notes

* fix pre-commit stuff

* misc updates

* fmt

* fix changelog

* Removal of tags and update docs

* Change after updating terraform-docs

* Add second tag
2020-02-04 19:34:17 +01:00
Daniel Piddock
11147e9af3 Node groups submodule (#650)
* WIP Move node_groups to a submodule

* Split the old node_groups file up

* Start moving locals

* Simplify IAM creation logic

* depends_on from the TF docs

* Wire in the variables

* Call module from parent

* Allow to customize the role name. As per workers

* aws_auth ConfigMap for node_groups

* Get the managed_node_groups example to plan

* Get the basic example to plan too

* create_eks = false works

"The true and false result expressions must have consistent types. The
given expressions are object and object, respectively."
Well, that's useful. But apparently set(string) and set() are ok. So
everything else is more complicated. Thanks.

* Update Changelog

* Update README

* Wire in node_groups_defaults

* Remove node_groups from workers_defaults_defaults

* Synchronize random and node_group defaults

* Error: "name_prefix" cannot be longer than 32

* Update READMEs again

* Fix double destroy

Was producing index errors when running destroy on an empty state.

* Remove duplicate iam_role in node_group

I think this logic works. Needs some testing with an externally created
role.

* Fix index fail if node group manually deleted

* Keep aws_auth template in top module

Downside: count causes issues as usual: can't use distinct() in the
child module so there's a template render for every node_group even if
only one role is really in use. Hopefully just output noise instead of
technical issue

* Hack to have node_groups depend on aws_auth etc

The AWS Node Groups create or edit the aws-auth ConfigMap so that nodes
can join the cluster. This breaks the kubernetes resource which cannot
do a force create. Remove the race condition with explicit depend.

Can't pull the IAM role out of the node_group any more.

* Pull variables via the random_pet to cut logic

No point having the same logic in two different places

* Pass all ForceNew variables through the pet

* Do a deep merge of NG labels and tags

* Update README.. again

* Additional managed node outputs #644

Add change from @TBeijin from PR #644

* Remove unused local

* Use more for_each

* Remove the change when create_eks = false

* Make documentation less confusing

* node_group version user configurable

* Pass through raw output from aws_eks_node_groups

* Merge workers defaults in the locals

This simplifies the random_pet and aws_eks_node_group logic. Which was
causing much consernation on the PR.

* Fix typo

Co-authored-by: Max Williams <max.williams@deliveryhero.com>
2020-01-09 12:53:08 +01:00
Ryan Ooi
b7ffc1b591 Control plane security group always whitelist worker security group and revert #186 (#631)
* Updates and revert #186

* update readme

* update changelog

* update changelog
2019-12-20 16:45:01 +01:00
William Morgan
cf3dcc5c58 Support for EKS Managed Node Groups (#602)
* Finished first cut of managed node groups

* Updated formatting and extra fields.

* Updating Changelog and README

* Fixing formatting

* Fixing docs.

* Updating required Version

* Updating changelog

* Adding example for managed node groups

* Managed IAM Roles for Nodegroups now have correct policies. Tags can now be added to node groups.

* Fixing bug where people could set source_security_group_ids without setting ssh key causing a race condition within the aws provider.

* Adding lifecycle create_before_destroy

* Adding random pet names for create_before_destroy

* Updating per comments.

* Updating required versions of terraform

* Updating per comments.

* Updating vars

* Updating minimum version for terraform

* Change worker_groups_managed_node_groups to node_groups

* Using for_each on the random_pet

* Adding changes recommended by @eytanhanig

* Update node_groups.tf
2019-12-04 18:30:36 +01:00
Miguel Ferreira
a8e54ccf73 Use join and splat syntax to access conditional resources (#569) 2019-10-29 13:55:21 +01:00
Scott Stanton
4f552891ff Allow the userdata template to be replaced (#565)
* Allow the userdata template to be replaced

* Address fmt issue

* Rename 'customer_userdata' name to 'userdata_template_file'

* Add support for userdata_template_extra_args

* Add support for userdata_template_extra_args

* fix merge conflicts

* Fix merge problem that dropped the file load
Add `platform` to the template expansion context
Add `userdata_launch_template` to `launch_template_userdata`
2019-10-29 12:12:47 +01:00
Joonsung Lee
2d52e06786 Add Windows support (#555)
* Add Windows support

* Assign eks:kube-proxy-windows group to worker nodes

* Add Instructions for adding Windows Workers at FAQ.md

* Remove unnecessary variables from userdata_windows.tpl

* Update CHANGELOG.md
2019-10-28 14:16:45 +01:00
Jeff Hastings
2e2f2acada change ebs_optimized mapping to list where not supported (#561)
* change ebs_optimized mapping to list where not supported

* update changelog
2019-10-21 12:57:29 +02:00
Josh Girón
f3beb8e5fc Update comments for 'asg_recreate_on_change' attribute in 'workers_gr… (#536)
* Update comments for 'asg_recreate_on_change' attribute in 'workers_group_defaults_defaults' for better clarify of what resources it's talking about.

* Expand a few more acronyms and abbreviations.
2019-09-27 09:28:55 +02:00
Tatu Seppä-Lassila
39cb93b1da Use null as default value for target group ARNs (#524)
* Use null as default value for target group ARNs
* Update CHANGELOG

close #499
2019-09-24 11:09:44 +02:00
Irtiza Ali
0fd7046120 update local.tf by fixing typo 2019-09-19 17:33:09 +05:00
irti
0d49f8265a [add-notes] update local.tf file 2019-09-19 00:13:20 +05:00
Sergiu Plotnicu
461cf5482e Support for Mixed Instances ASG in worker_groups_launch_template variable (#468)
* Create ASG tags via for - utility from terraform 12

* Updated support for mixed ASG in worker_groups_launch_template variable

* Updated launch_template example to include spot and mixed ASG with worker_groups_launch_template variable

* Removed old config

* Removed workers_launch_template_mixed.tf file, added support for mixed/spot in workers_launch_template variable

* Updated examples/spot_instances/main.tf with Mixed Spot and ondemand instances

* Removed launch_template_mixed from relevant files

* Updated README.md file

* Removed workers_launch_template.tf.bkp

* Fixed case with null on_demand_allocation_strategy and Spot allocation

* Fixed workers_launch_template.tf, covered spot instances via Launch Template
2019-09-13 16:50:59 +02:00
Thierno IB. BARRY
4264a5fe6e use default_iam_role_id interpolation for aws_iam_instance_profile (#489) 2019-09-11 18:25:33 +02:00
Thierno IB. BARRY
d6d0975452 add initial lifecycle hooks for autosacling groups (#466) 2019-08-20 15:45:06 +02:00
Thierno IB. BARRY
d8ed7d0b66 add option to recreate ASG when LT or LC changes (#465) 2019-08-20 15:43:18 +02:00
Scott Crooks
b335819f0e Adding 'capacity-optimized' docs to locals (#469) 2019-08-19 16:22:11 +02:00
Tarek Abdel Sater
fb71eaf6ff Allow launch template spot instances without mixed policy (#463)
* Add option to enable spot without MixedInstancePolicy

* Update docs
2019-08-06 18:18:06 +02:00
Petri Kero
c9986f5e01 Fix errors from usage of coalesce (#402) (#459)
* Replace coalesce() usage for locals with ternary operator. Fixes terraform errors during destroy when only empty strings were passed to coalesce().

* Update changelog.

* Fix formatting.
2019-08-06 18:05:54 +02:00
Max Williams
6ea3582940 new release (#452) 2019-07-30 16:02:21 +02:00
Onur Sam
a95ad00b0a added market options to request spot instances without pools (#409)
* added market options to request spot instances without specifying pools in a launch template

* formatted

* simplified implementation

* formatted

* Update CHANGELOG.md
2019-07-23 17:33:16 +02:00
Alexander Shinkarenko
34b74518e8 Configure 'cpu_credits' for workers (#253) (#426)
* Configure 'cpu_credits' for workers (#253)

* Updated CHANGELOG(#253)

* Moved default to settings for launch templates(#253)
2019-07-12 14:44:54 +02:00
刘相轩
4b1df0c0af Update default override instance types to work with Cluster Autoscaler (#425) 2019-07-08 11:18:13 +02:00
Alex Romanov
069c2da770 typo (#407) 2019-06-24 15:41:40 +02:00
刘相轩
da2c78b8ba Upgrade to terraform 0.12 (#394)
* run terraform upgrade tool

* fix post upgrade TODOs

* use strict typing for variables

* upgrade examples, point them at VPC module tf 0.12 PR

* remove unnecessary `coalesce()` calls

coalesce(lookup(map, key, ""), default) -> lookup(map, key, default)

* Fix autoscaling_enabled broken (#1)

* always set a value for tags, fix coalescelist calls

* always set a value for these tags

* fix tag value

* fix tag value

* default element available

* added default value

* added a general default

without this default - TF is throwing an error when running a destroy

* Fix CI

* Change vpc module back to `terraform-aws-modules/vpc/aws` in example

* Update CHANGELOG.md

* Change type of variable `cluster_log_retention_in_days` to number

* Remove `xx_count` variables

* Actual lists instead of strings with commas

* Remove `xx_count` variable from docs

* Replace element with list indexing

* Change variable `worker_group_tags` to a attribute of worker_group

* Fix workers_launch_template_mixed tags

* Change override_instance_type_x variables to list.

* Update CHANGELOG.md
2019-06-19 09:57:51 +02:00
Mitch Anderson
758fdab1ee Termination Policy Option to worker ASG (#393)
* Adding Worker ASG Option for termination_policies, default set to Default

* Adding setting to launch template and mixed

* Updated a few more things per PR notes

* Change termination_policy default from "Default" to ""
2019-06-12 18:11:24 +02:00