Commit Graph

51 Commits

Author SHA1 Message Date
Suresh Kumar Nalluru
d48ff6dccb feat: Add support for service_ipv4_cidr for the EKS cluster (#1139) 2021-01-28 23:14:53 +01:00
Thierno IB. BARRY
ea2f6982d5 chore: Fix terraform format for TF 0.14 (#1157) 2020-12-22 11:32:13 +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
senthil Vivekanandan
c54ce911dc fix: Set IAM Path for cluster_elb_sl_role_creation IAM policy (#1045) 2020-10-12 13:51:28 +02:00
Rich Lafferty
c799fecd85 fix: Use customer managed policy instead of inline policy for cluster_elb_sl_role_creation (#1039)
NOTE: The usage of customer managed policy, not an inline policy, for the `cluster_elb_sl_role_creation policy` is common for "enterprise" AWS users to disallow inline policies with an SCP rule for auditing-related reasons, and this accomplishes the same thing.
2020-10-06 09:24:22 +02:00
Thomas O'Neill
31ad394dbc feat: Add AmazonEKSVPCResourceController to cluster policy to be able to set AWS Security Groups for pod (#1011)
Co-authored-by: Thomas O'Neill <toneill@new-innov.com>
2020-10-04 20:08:02 +02:00
Anthony Dahanne
1adbe82e15 fix: Create cluster_private_access security group rules when it should (#981)
BREAKING CHANGES: Default for `cluster_endpoint_private_access_cidrs` is now `null` instead of `["0.0.0.0/0"]`. It makes the variable required when `cluster_create_endpoint_private_access_sg_rule` is set to `true`. This will force everyone who want to have a private access to set explicitly their allowed subnets for the sake of the principle of least access by default.
2020-09-02 22:38:02 +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
Ivan Sukhomlyn
9a0e548dcc feat: Add IAM permissions for ELB svc-linked role creation by EKS cluster (#902)
AmazonEKSClusterPolicy IAM policy doesn't contain all necessary permissions to create ELB service-linked role required during LB provisioning at AWS by K8S Service.

https://github.com/terraform-aws-modules/terraform-aws-eks/issues/900
https://github.com/terraform-aws-modules/terraform-aws-eks/issues/183#issuecomment-435229552
2020-06-28 14:44:36 +02:00
Ariel Viñas
348f441221 fix: remove unnecessary conditional in private access security group (#915) 2020-06-10 12:38:56 +02:00
Sam "Bo" Beckwith III
49b0667cd9 fix: Fix destroy failure when talking to EKS endpoint on private network (#815) 2020-03-24 23:19:41 +01:00
Viacheslav Vasilyev
de1419b597 feat: Add interpreter option to wait_for_cluster_cmd (#795)
Co-authored-by: Vasilyev, Viacheslav <viacheslav.vasilyev@accenture.com>
Co-authored-by: Thierno IB. BARRY <ibrahima.br@gmail.com>
2020-03-20 21:34:33 +01:00
slimm609
9951c87a86 fix: add ip address when manage_aws_auth is true and public_access is false (#745) 2020-03-19 16:22:22 +01:00
Daniel Piddock
50f5f8b874 fix: Do not recreate cluster when no SG given (#798) 2020-03-18 09:04:17 +01:00
Daniel Piddock
e8a1ce17d8 fix: Create false and avoid waiting forever for a non-existent cluster to respond (#789) 2020-03-18 08:54:57 +01:00
Wolodja Wentland
23c005e5ef Add EKS Secret envelope encryption support (#772)
This adds support for configuring EKS clusters that utilise envelope
encryption for Secrets:

- https://aws.amazon.com/about-aws/whats-new/2020/03/amazon-eks-adds-envelope-encryption-for-secrets-with-aws-kms/

- https://aws.amazon.com/blogs/containers/using-eks-encryption-provider-support-for-defense-in-depth/
2020-03-11 12:26:06 +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
Andrey Zhelnin
de90ff5d3a Don't create ingress rule if worker security group exists (#715) 2020-01-28 16:34:55 +01:00
Sanjeev Giri
905d9f05a9 Configurable local exec command for waiting until cluster is healthy (#701)
* Configurable local exec command for waiting until cluster is healthy

* readme

* line feeds

* format

* fix readme

* fix readme

* Configurable local exec command for waiting until cluster is healthy (#1)

* Configurable local exec command for waiting until cluster is healthy

* readme

* line feeds

* format

* fix readme

* fix readme

* change log

* Configurable local exec wait 4 cluster op (#2)

* Configurable local exec command for waiting until cluster is healthy

* readme

* line feeds

* format

* fix readme

* fix readme

* change log

* changelog (#3)

* Changelog (#4)

* changelog

* changelog

* simplify wait_for_cluster command

* readme

* no op for manage auth false

* formatting

* docs? not sure

* linter

* specify dependency to wait for cluster more accurately
2020-01-27 16:29:24 +01:00
Siddarth Prakash
82aefb20f5 Add public access endpoint CIDRs option (terraform-aws-eks#647) (#673)
* Add public access endpoint CIDRs option (terraform-aws-eks#647)

* Update required provider version to 2.44.0

* Fix formatting in docs
2020-01-10 00:53:33 +01:00
Max Williams
a9db852d44 Release 8.0.0 (#662)
* Release 8.0.0

* Update changelog

* remove 'defauls' node group

* Make curl silent
2020-01-09 14:10:47 +01:00
Shaun Cutts
d79c8ab6f2 Wait cluster responsive (#639)
* wait for cluster to respond before creating auth config map

* adds changelog entry

* fixup tf format

* fixup kubernetes required version

* fixup missing local for kubeconfig_filename

* combine wait for cluster into provisioner on cluster; change status check to /healthz on endpoint

* fix: make kubernetes provider version more permissive
2020-01-07 12:28:56 +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
Morgan Christiansson
edcbba64ef Add tags to aws_eks_cluster introduced in terraform-provider-aws 2.31.0 (#550)
- https://github.com/terraform-providers/terraform-provider-aws/pull/10307
- https://aws.amazon.com/about-aws/whats-new/2019/09/amazon-eks-supports-cluster-tagging/
2019-10-04 14:48:53 +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
till-krauss
ba3377360e Added Option to use KMS key for cloudwatch logs group. (#404) 2019-06-24 12:53:43 +02:00
Max Williams
9c3d222bd5 New release: now supporting TF 0.12!! (#399)
* New release: now supporting TF 0.12

* updating precommit hook version
2019-06-19 17:27:25 +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
Camilo Santana
3f0601551f adds tags to resource aws_iam_role.cluster (#390)
* adds tagging to iam role

Signed-off-by: camilo santana <camilo.santana@procore.com>

* emulates name_prefix

Signed-off-by: camilo santana <camilo.santana@procore.com>

* incriment version

Signed-off-by: camilo santana <camilo.santana@procore.com>

* tags iam role

Signed-off-by: camilo santana <camilo.santana@procore.com>

* improve resource name

Signed-off-by: camilo santana <camilo.santana@procore.com>

* removes comments

Signed-off-by: camilo santana <camilo.santana@procore.com>

* reverts erroneous increment to release version

Signed-off-by: camilo santana <camilo.santana@procore.com>

* reverts aws_iam_role.cluster name to orig value

Signed-off-by: camilo santana <camilo.santana@procore.com>

* removes random suffix idea

i was using random_id until i could figure out a datestamp or something here. `name_prefix` does a better job.

Signed-off-by: camilo santana <camilo.santana@procore.com>

* terraform fmt on local.tf

Signed-off-by: camilo santana <camilo.santana@procore.com>
2019-06-13 10:36:58 +02:00
Yurii Polishchuk
bf5dae00e1 Enable log retention for cloudwatch log groups (#387)
* enable log retention for cloudwatch log groups

* revert version bump

* set default retention to 90 days
2019-06-13 10:03:34 +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
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
18e00861e4 Adding EKS Control Plane logging options (#340)
* Adding EKS Control Plane logging options

* Added feature addition

* Removing 'optional'

* Adding documentation, and changing variable order

* Using pre-commit instead

* adding IAM instance profiles to outputs, addresses #323 (#329)

* adding IAM instance profiles to outputs

* updating changelog

* updated README
2019-04-11 15:21:09 +02:00
Stijn De Haes
806edb6001 Add support for eks endpoint_private_access and endpoint_public_access (#314) 2019-03-25 12:05:32 +01: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
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
Max Williams
b15e1d7e95 Removing aws_iam_service_linked_role from module (#160) 2018-10-17 13:02:00 +02:00
Ritchelle Grace Posadas
0ee9d633d3 Added timeout configs and variables to aws_eks_cluster resource (#149)
* Added timeout configs and variables

* Updated CHANGELOG and README

* Added timeout configs and variables

* Updated CHANGELOG and README

* Changed variable names for consistency

* Updated README.md

* Did terraform fmt
2018-10-04 15:57:48 +02:00
Max Williams
405e170f90 Adding aws_iam_service_linked_role to fix ELB creation error (#91)
* adding aws_iam_service_linked_role to fix ELB creation error

* setting default to false

* updating changelog

* moving resource to cluster.tf file
2018-08-30 11:23:10 +02:00
Daniel Piddock
13e1adc419 Remove unnecessary http callout and security rule
EKS masters are publicly accessible. You cannot restrict access nor
need to explicitly grant access.
https://github.com/terraform-aws-modules/terraform-aws-eks/pull/69#issuecomment-406123233
2018-08-03 21:52:16 +02:00
jimbecker
98ede7cca6 Override the default ingress rule that allows communication with the EKS cluster API. If not given, will use current IP/32. 2018-06-27 13:12:14 -04:00
brandoconnor
6bda7ee97d workers can now be specified as multiple asgs of different flavors. BYO security group now possible for both workers and cluster 2018-06-11 03:34:13 -07:00
brandoconnor
6a137f751e somehow missed fmt 2018-06-06 22:32:15 -07:00
brandoconnor
283e9b203c cleaning up before initial release 2018-06-06 21:58:12 -07:00
brandoconnor
309e7f7083 testing initial work now 2018-06-06 20:55:44 -07:00