Commit Graph

81 Commits

Author SHA1 Message Date
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
Scott Crooks
97c79643fb Adding minimum communication security group rule for Kubelet (#318)
* Adding minimum communication

The docs at https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html specify that port 10250 is needed at a minimum for communication between the control plane, and the worker nodes. If you specify a `worker_sg_ingress_from_port` as something like `30000`, then this minimum communication is never established.

* Adding description to CHANGELOG.md

* Adjusting the naming of the resources

* Ensuring creation is conditional on the value of `worker_sg_ingress_from_port`

* Mistake, should be greater than port 10250
2019-03-25 11:58:55 +01:00
Matheus Fernandes
fd1f149432 Add support for placement groups (#306) 2019-03-20 13:38:41 +01:00
Nicolas Szalay
bef3c36a40 Allow additional policies to be attached to worker nodes (#308)
Example usage : we want our nodes to be able to update route53 record
for using external-dns.

```hcl
data "template_file" "eks_worker_additional_route53_policy" {
  template = "${file("iam/route53_policy.json.tpl")}"
}

resource "aws_iam_policy" "eks_worker_additional_route53_policy" {
  description = "Allow nodes to update our zone"
  name = "${module.k8s_cluster01_label.id}-additional-route53-policy"
  policy = "${data.template_file.eks_worker_additional_route53_policy.rendered}"
}
```

which defines the policy; then in the EKS module :
```hcl
module "cluster01" {
  cluster_name = "cluster01"
<snip>
  workers_addtional_policies = [
    "${aws_iam_policy.eks_worker_additional_route53_policy.arn}"
  ]
  workers_addtional_policies_count = 1
<snip>
```
2019-03-20 13:30:16 +01:00
Taylor Barrella
efaa3d8d60 Add cluster name and ephemeral storage tags for cluster autoscaler (#299) 2019-03-20 13:19:38 +01:00
Sung Kang
28fd3c5530 add ec2:DescribeLaunchTemplateVersions action to worker node iam role 2019-03-07 07:39:44 -06:00
Anders Åslund
3728299161 Add optional iam_path 2019-03-05 12:31:35 +01:00
Dylan Hellems
a1a1644f80 Add optional permissions_boundary (#265)
* Add optional permissions_boundary

* Update CHANGELOG
2019-02-07 16:38:16 +01:00
Stefan Sedich
35747d707a Worker group tags (#252)
* Allow per worker group ASG tags to be set

* Format

* Set correct defaults

* Implement hack that will use the first item in the list if a matching item does not exist for the worker group

* Use a map that will map from the worker group name to the tags to get around the issue where list indexing does not work with a list of lists

* Format

* Cleanup

* Fix sample

* README
2019-01-31 15:38:53 +01:00
Stefano Zaninetta
39f30e9d58 Add enabled_metrics attributes to autoscaling_group (#256)
* make enabled_metrics property configurable

* update changelog
2019-01-30 11:50:41 +01:00
Stefan Sedich
8473c69f25 Enable create_before_destroy for ASG and enable force_delete to be configured (#250)
* Allow force_delete to be passed to the ASG, and set ASG so that it will create before deletion.

* Set default

* Adding CHANGELOG
2019-01-24 10:48:26 +01:00
skang0601
f3ab7c67da Allows worker groups to be created using AWS Launch Templates (#222) 2019-01-10 16:19:19 +01:00
Marcello Romani
646831423a Remove invalid action from policy (#239) 2019-01-10 16:02:37 +01:00
rmakram-ims
9d6740e116 Add ability to pass computed values to cluster_security_group_id and worker_security_group_id (#186)
* Add ability to pass computer values to cluster_security_group_id and worker_security_group_id

* Fix contributer name in CHANGELOG.md

* Format variables.tf file
2018-12-13 17:00:48 +01:00
mark kelly
cddac92757 Destroying cluster causes some issues with removing policies (#196)
* Destroying cluster causes some issues with removing policies

use the force detach

https://www.terraform.io/docs/providers/aws/r/iam_role.html#force_detach_policies

* Destroying cluster causes some issues with removing policies

* formatting

* Destroying cluster causes some issues with removing policies

* CHANGELOG
2018-11-23 14:33:02 +01:00
Zihao Yu
d580369779 Add target_group_arns to worker ASG (#167)
* add target_group_arns to worker default

* add to changelog
2018-10-18 14:13:31 +02:00
Bruno Meneguello
d31bf4f83c Add suspended_processes attributes to autoscaling_group (#159) 2018-10-09 14:38:15 +02:00
Max Williams
ba43786412 Revert "Add suspended_processes attributes to autoscaling_group (#153)" (#157)
This reverts commit c8cc60f46d.
2018-10-09 11:24:42 +02:00
Bruno Meneguello
c8cc60f46d Add suspended_processes attributes to autoscaling_group (#153) 2018-10-09 10:52:12 +02:00
monsterxx03
6de0825644 Add option to change worker placement_tenancy. (#142)
* Add option to change worker placement_tenancy.

* update CHANGELOG.md
2018-10-09 10:46:58 +02:00
Max Williams
5d9d4fb8b8 Allowing 443 to nodes from EKS service (#148) 2018-10-09 10:38:17 +02:00
Max Williams
77a7690b1c Fixing travis config (#151) 2018-10-04 14:47:54 +02:00
Max Williams
3b546a9c1b Fix for ERROR: 'aws_iam_instance_profile.workers' not found (#141) 2018-09-25 22:00:14 +02:00
Max Williams
fdd44c8f38 Cosmetic fixes (#131)
* changing syntax when referring to map keys without lookup function

* Replacing map function with actual maps for easier reading

* replacing map function in example

* replacing map function in workers.tf and readme/main

* update changelog
2018-09-25 12:30:56 +02:00
Andrew Lavery
b623bc234a allow specifying an IAM role for each worker group (#137)
* allow creating an IAM role for each worker group

* moved change from 'changed' to 'added'

* create multiple roles not just profiles

* fix config_map_aws_auth generation

* don't duplicate worker-role templating

* specify ARNs for worker groups individually

todo fix aws_auth configmap

* fixed AWS auth

* fix aws_iam_instance_profile.workers name
fix iam_instance_profile fallback

* fix outputs

* fix iam_instance_profile calculation

* hopefully fix aws auth configmap generation

* manually fill out remainder of arn

* remove depends_on in worker_role_arns template file

this was causing resources to be recreated every time

* fmt

* fix typo, move iam_role_id default to defaults map
2018-09-24 16:08:35 +02:00
Samuel Fredrickson
b6f6a82352 Add worker group option to protect from scale in. (#135)
See [#134](https://github.com/terraform-aws-modules/terraform-aws-eks/issues/134)
2018-09-18 11:24:52 +02:00
Touch Ungboriboonpisal
0448350468 Fix default worker autoscaling_enabled not working (#130) 2018-09-12 11:18:00 +02:00
Touch Ungboriboonpisal
50404a785b fix default worker subnets not working (#122) 2018-09-11 18:03:23 +02:00
mr-joshua
0180644770 Allow additional security groups to be included in worker launch configurations (#112)
* Allow additional security groups to be included for all workers and each worker group #47

* update changelog with reference to issue and be more descriptive

* Update CHANGELOG.md

* address pr comments and rebase

* rebase

* fix bug introduced by PR#115 that sets the AMI id to the default value of "" always

* rebase

* align default value of additional_security_group_ids to be pulled from local var workers_group_defaults_defaults
2018-09-04 17:09:24 +02:00
Max Williams
da6ff7d151 Fix for "" AMI ID error in PR 115 (#117)
* Fix for "" AMI ID

* update changelog
2018-09-04 16:31:23 +02:00
Touch Ungboriboonpisal
5531776e2c Allow a custom AMI to be specified as a default (#115)
* fallback to the default workers group ami_id before the official one

* add CHANGELOG
2018-09-04 12:31:16 +02:00
Daniel Piddock
23647950ad Easier overriding of workers_group_defaults (#107) 2018-08-30 11:21:46 +02:00