Commit Graph

64 Commits

Author SHA1 Message Date
Olesia Ivanenko
710903170f feat: Create SG rule for each new cluster_endpoint_private_access_cidr block (#1549) 2021-09-06 14:04:56 +02:00
Sungho Spark
752c183678 fix: Worker security group handling when worker_create_security_group=false (#1461) 2021-09-06 13:40:50 +02:00
Anton Babenko
c2490c5148 feat: Ability to tag just EKS cluster (#1569) 2021-09-03 16:54:59 +02:00
Thierno IB. BARRY
1d848b56bf fix: Remove duplicated security group rule for EKS private access endpoint (#1412)
NOTES: In this bug fix, we remove a duplicated security rule introduced during a merge conflict resolution in [#1274](https://github.com/terraform-aws-modules/terraform-aws-eks/pull/1274)
2021-05-28 21:11:02 +02:00
Marc Haase
796cbead2f feat: Add ability to use Security Groups as source for private endpoint access (#1274)
BREAKING CHANGES: The private endpoint security group rule has been renamed to allow the use of CIDR blocks and Security Groups as source. This will delete the `cluster_private_access` Security Group Rule for existing cluster. Please rename by `aws_security_group_rule.cluster_private_access[0]` into `aws_security_group_rule.cluster_private_access_cidrs_source[0]`.

Co-authored-by: Thierno IB. BARRY <ibrahima.br@gmail.com>
2021-05-28 14:56:02 +02:00
Thierno IB. BARRY
1f22d24df6 fix: Add back depends_on for data.wait_for_cluster (#1389) 2021-05-25 11:06:04 +02:00
Tamas Millian
a639cf5138 fix: Add description for private API ingress Security Group Rule (#1299) 2021-05-19 15:50:43 +02:00
Thierno IB. BARRY
19e6be9df3 feat: Add timeout of 5mn when waiting for cluster (#1359) 2021-05-17 14:10:33 +02:00
Thierno IB. BARRY
e3bf48bba2 feat: Replace the local-exec script with a http datasource for waiting cluster (#1339)
NOTES: Using the [terraform-aws-modules/http](https://registry.terraform.io/providers/terraform-aws-modules/http/latest) provider is a more platform agnostic way to wait for the cluster availability than using a local-exec. With this change we're able to provision EKS clusters and manage the `aws_auth` configmap while still using the `hashicorp/tfc-agent` docker image.
2021-05-17 10:11:36 +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
Xavier Fernandez
81bc7a2dd1 feat: Allow to specify the managed cluster IAM role name (#1199) 2021-04-20 10:26:39 +02:00
danvbloomberg
fb5939314a fix: Add missing IAM permission for NLB with EIPs (#1226) 2021-04-19 23:02:08 +02:00
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