Commit Graph

112 Commits

Author SHA1 Message Date
Anton Babenko
2bdf7d7dd6 refactor: Refactoring to match the rest of terraform-aws-modules (#1583) 2021-09-16 11:35:44 +02:00
Junaid Ali
bcea0708e6 feat: Added throughput support for root and EBS disks (#1445) 2021-09-02 12:28:13 +02:00
LAKostis
1e2c32430f feat: Add capacity_rebalance support for self-managed worker groups (#1326) 2021-06-03 23:41:39 +02:00
Benjamin Ash
68e9df92c3 feat: Add support for Auto Scaling Group Instance Refresh for self-managed worker groups (#1224)
Co-authored-by: Thierno IB. BARRY <ibrahima.br@gmail.com>
2021-05-17 22:12:53 +02:00
Thierno IB. BARRY
32f70afe60 feat: Drop asg_recreate_on_change feature to encourage the usage of Instance Refresh for EC2 Auto Scaling (#1360)
BREAKING CHANGES: This module used `random_pet` resources to create a random name for the autoscaling group to force the autoscaling group to be re-created when the launch configuration or launch template was changed (if `recreate_asg_when_lc_changes = true` was set), causing the instances to be removed and re-provisioned each time there was an update. Those random_pet resources has been removed and in its place there is now a set of functionality provided by AWS and the Terraform AWS provider - Instance Refresh. We encourage those users to move on Instance Refresh for EC2 Auto Scaling.
2021-05-17 16:20:35 +02:00
Dov Salomon
f7d09a2901 feat: Remove dependency on deprecated hashicorp/template provider (#1297)
BREAKING CHANGES: We remove the dependency on the deprecated `hashicorp/template` provider and use the Terraform built in `templatefile` function. This will broke some workflows due to previously being able to pass in the raw contents of a template file for processing. The `templatefile` function requires a template file that exists before running a plan.
2021-05-17 10:25:38 +02:00
Ivan Sukhomlyn
c12c186432 feat: Add tags on additional IAM resources like IAM policies, instance profile, OIDC provider (#1321) 2021-05-04 21:55:49 +02:00
Matt Dainty
2a78efd082 feat: Allow to override cluster and workers egress CIDRs (#1237) 2021-04-20 11:13:14 +02:00
Kamil Aliev
fc6852d63a fix: Add mission metadata block for launch configuration (#1301) 2021-04-19 23:10:25 +02:00
Sergiu Plotnicu
2549408803 feat: Add support for ASG Warm Pools (#1310) 2021-04-19 23:05:06 +02:00
Tjeu Kayim
2a6f07a0e8 fix: Updated code and version requirements to work with Terraform 0.15 (#1165) 2021-04-16 09:56:37 +02: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
ea2f6982d5 chore: Fix terraform format for TF 0.14 (#1157) 2020-12-22 11:32:13 +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
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
Thierno IB. BARRY
c75fbb0164 fix: Fix cycle error during the destroy phase when we change workers order (#1043)
NOTES: Keep in mind that changing the order of workers group is a destructive operation. All workers group are destroyed and recreated. If you want to do this safely, you should move then in state with `terraform state mv` until we manage workers groups as maps.
2020-10-12 21:50:22 +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
Daniel Piddock
bceb966dfd fix: More compatibility fixes for Terraform v0.13 and aws v3 (#976)
Additional support for Terraform v0.13 and aws v3!
- The update to the vpc module in examples was, strictly speaking, unnecessary but it adds the terraform block with supported versions.
- Update for iam module in the example was very necessary to support new versions
- Workaround for "Provider produced inconsistent final plan" when creating ASGs at the same time as the cluster. See  https://github.com/terraform-providers/terraform-provider-aws/issues/14085 for full details.
- Blacklist 0.13.0 as it was too strict when migrating from aws v2 to v3 about dropped attributes.
2020-09-08 18:25:46 +02:00
Marcus Vaal
db9bb0b482 feat: worker launch templates and configurations depend on security group rules and IAM policies (#933)
In order to ensure proper ordering when running terraform destroy. This will block Terraform from removing up security group rules before the cluster has finished its clean up chores.
2020-07-12 17:14:36 +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
b183b97253 improvement: Remove dependency on external template provider (#854)
* Remove template_file for generating kubeconfig

Push logic from terraform down to the template. Makes the formatting
slightly easier to follow

* Remove template_file for generating userdata

Updates to the eks_cluster now do not trigger recreation of launch
configurations

* Remove template_file for LT userdata

* Remove template dependency
2020-05-06 10:54:14 +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
Thierno IB. BARRY
2715b01e4e fix max_instance_lifetime for workers (#771)
* fix max_instance_lifetime for workers

* update changelog

* update changelog
2020-03-10 22:01:01 +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
Yecheng Fu
8382f2c4e8 use the correct policy arns if the region is in CN (#765) 2020-03-09 16:02:53 +01:00
Craig Rueda
276e41f744 Adding encrypted option to root_block_device of launch_configuration (#761)
* Adding encrypted option to root_block_device of launch_configuration

* Updating CHANGELOG.md

* Setting back to empty string
2020-03-06 12:54:12 +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
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
Tomislav Tomašić
124ea7c151 Add destroy time flag (#580)
* Add destroy-time flag

* Update changelog

Fix cluster count

* Fix cluster count

* Fix docs

* Fix outputs

* Fix unsupported attribute on cluster_certificate_authority_data output

Co-Authored-By: Daniel Piddock <33028589+dpiddockcmp@users.noreply.github.com>

* Remove unnecessary flatten from cluster_endpoint output

Co-Authored-By: Daniel Piddock <33028589+dpiddockcmp@users.noreply.github.com>

* Improve description of var.enabled

* Fix errors manifesting when used on an existing-cluster

* Update README.md

* Renamed destroy-time flag

* Revert removal of changelog addition entry

* Update flag name in readme

* Update flag variable name

* Update cluster referencing for consistency

* Update flag name to `create_eks`

* Fixed incorrect count-based reference to aws_eks_cluster.this (there's only one)

* Replaced all incorrect aws_eks_cluster.this[count.index] references (there will be just one, so using '[0]').

* Changelog update, explicitly mentioning flag

* Fixed interpolation deprecation warning

* Fixed outputs to support conditional cluster

* Applied create_eks to aws_auth.tf

* Removed unused variable. Updated Changelog. Formatting.

* Fixed references to aws_eks_cluster.this[0] that would raise errors when setting create_eks to false whilst having launch templates or launch configurations configured.

* Readme and example updates.

* Revert "Readme and example updates."

This reverts commit 18a0746355e136010ad54858a1b518406f6a3638.

* Updated readme section of conditionally creation with provider example.

* Added conditions to node_groups.

* Fixed reversed map_roles check

* Update aws_auth.tf

Revert this due to https://github.com/terraform-aws-modules/terraform-aws-eks/pull/611
2019-12-09 10:06:10 +01:00
Miguel Ferreira
a8e54ccf73 Use join and splat syntax to access conditional resources (#569) 2019-10-29 13:55:21 +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
Daniel Piddock
813c607e90 Make "dangerous" policy attachments optional (#539) 2019-10-04 14:25:19 +02:00
Thierno IB. BARRY
186c88a34b Add option to enable lifecycle hooks creation (#532)
* add option to enable lifecycle hooks creation

* update changelog
2019-09-26 19:40:41 +02: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
Ivanich
a47f464221 Allow to set user defined workers role name (#496)
* Allow to set user defined workers role name

* Add changelog entry

* Keep single variable for worker role name
2019-09-12 17:45:04 +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
97df53c099 launch configuration doen't have version (#482)
close #479
2019-08-27 17:49:21 +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
Lucas Giacomazzi
ebac6c92bf Adding tags for Log groups and workers IAM role (#448)
* Adding tags for Cloudwatch log group

* Adding tags for workers IAM role

* Update CHANGELOG.md

* Removing change in CHANGELOG.md

* Fixing formatting issues
2019-08-06 18:01:01 +02:00
Alexandr Grab
c5c3d385b7 Additional tag for autoscaling enabled (#454)
* Additional tag for autoscaling_enabled

* Added changelog
2019-08-01 16:26:41 +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
Max Williams
ae2f8e58db Adding new mixed type of worker group with instance overrides and mixed instances policy (#371)
* Adding new mixed type of worker group with instance overrides and mixed instances policy

* moving all count and lifecycle rule parameters to top/bottom

* adding custom IAM parts

* updating doc with new options

* fixes for spot instances
2019-05-07 16:50:42 +02:00
Max Williams
2439c25771 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
2019-05-07 15:41:44 +02:00
Touch Ungboriboonpisal
959e5330e3 Support custom IAM roles for cluster and workers (#338)
* allow specifying custom worker IAM instance profiles

* allow specifying custom cluster IAM role

* add doc

* update changelog

* use data.aws_iam_instance_profile.name
2019-05-07 14:46:06 +02:00