Commit Graph

174 Commits

Author SHA1 Message Date
Thierno IB. BARRY
094e363362 fix: Use the amazon ImageOwnerAlias for worker ami owner instead of owner id (#1038) 2020-10-06 14:26:50 +02:00
Dawid Rogaczewski
d8ab5d4d6d improvement: update the wait_for_cluster_cmd logic to use curl if wget doesn't exist (#1002) 2020-10-05 14:59:40 +02:00
Thierno IB. BARRY
594602f75a ci: Bump terraform pre-commit hook version and re-run terraform-docs with the latest version to fix the CI (#1033)
* bump pre-commit hook version
* re-run terraform-docs with the latest version
2020-10-04 20:45:43 +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
Thierno IB. BARRY
ad5373dc61 docs: Add important notes about the retry logic and the wget requirement (#999) 2020-09-04 23:04:41 +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
Dawid Rogaczewski
44d59da57b docs: Update README about cluster_version variable requirement (#988) 2020-08-27 10:08:11 +02:00
Daniel Piddock
1bd5bf5ab9 feat: Cluster version is now a required variable. (#972)
BREAKING CHANGES: `cluster_version` variable is now required.
2020-08-14 16:06:53 +02:00
Daniel Piddock
9ace344c57 docs: Better documentation of cluster_id output blocking (#955)
NOTES: Starting in v12.1.0 the `cluster_id` output depends on the
`wait_for_cluster` null resource. This means that initialisation of the
kubernetes provider will be blocked until the cluster is really ready,
if the module is set to manage the aws_auth ConfigMap and user followed
the typical Usage Example. kubernetes resources in the same plan do not
need to depend on anything explicitly.
2020-08-12 15:22:24 +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 Marshall
a89e91bf8f feat: Add aws_security_group_rule.cluster_https_worker_ingress to output values (#901) 2020-06-06 10:55:35 +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
Thierno IB. BARRY
a4e21e73cd docs: Add notes for Kubernetes 1.16 (#873)
BREAKING CHANGES: The default `cluster_version` is now 1.16. Kubernetes 1.16 includes a number of deprecated API removals, and you need to ensure your applications and add ons are updated, or workloads could fail after the upgrade is complete. For more information on the API removals, see the [Kubernetes blog post](https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/). For action you may need to take before upgrading, see the steps in the [EKS documentation](https://docs.aws.amazon.com/eks/latest/userguide/update-cluster.html). Please set explicitly your `cluster_version` to an older EKS version until your workloads are ready for Kubernetes 1.16.
2020-05-08 18:41:21 +02:00
graywolf-at-work
312596f46d feat: Create kubeconfig with non-executable permissions (#864)
* Create kubeconfig with non-executable permissions

Kubeconfig does not really need to be executable, so let's not create it with executable bit set.

* Bump tf version
2020-05-06 21:36:58 +02:00
Scott Crooks
99f59bfcc9 feat: Change EKS default version to 1.16 (#857) 2020-05-06 17:20:28 +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
slimm609
9c2a718744 fix: Add vpc_config.cluster_security_group output as primary cluster security group id (#828) 2020-04-23 17:36:51 +02:00
Valeri GOLUBEV
2fd078e7c1 feat: Add support for EC2 principal in assume worker role policy for China (#827)
* Add support for EC2 principal in assume worker role policy for  China AWS

* Remove local partition  according to requested change

Co-authored-by: Valeri GOLUBEV <vgolubev@kyriba.com>
2020-04-11 14:11:22 +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
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
0c1ed0e6e9 Improvement: Require kubernetes provider >=1.11.1 (#784)
BREAKING CHANGE: The terraform-aws-eks module now require at least kubernetes `1.11.1`. This may cause terraform to fail to init if users have set version = "1.10" like we had in the examples.
2020-03-18 13:56:51 +01:00
Daniel Piddock
2c98a00b21 improvement: Add timeout to default wait_for_cluster_cmd (#791) 2020-03-17 19:06:09 +01:00
Max Williams
cd8a825a5a test: remove unused kitchen test related stuff (#787)
Co-authored-by: Thierno IB. BARRY <ibrahima.br@gmail.com>
2020-03-17 16:36:34 +01:00
Thierno IB. BARRY
9fb1a20d82 improvement: automate changelog management (#786) 2020-03-17 14:22:22 +01:00
pierresteiner
2a78825ef7 Remove assumption (#779)
* Remove assumption

This is not needed since 8.0.0 right?

* Update CHANGELOG.md

Co-authored-by: Thierno IB. BARRY <ibrahima.br@gmail.com>
2020-03-12 10:34:13 +01:00
Scott Crooks
7dc56e976b EKS 1.15 Support (#776)
* chore(eks): Support EKS 1.15

* docs(changelog): Adding entry to CHANGELOG

* chore(examples): Removing VPC tags from merged PR #772

* docs(changelog): Adding 'breaking' to CHANGELOG entry
2020-03-11 17:06:55 +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
Igor Konforti
da53b5cab3 changing timeout (#736)
* change timeout

* Update README.md

Co-authored-by: Max Williams <max.williams@deliveryhero.com>
2020-02-27 11:41:41 +01:00
Andres De Castro
dda244994d Pin version for kubernetes provider across examples to exactly 1.10.0 (#735)
* Update README.md

* Update main.tf

* Update main.tf

* Update main.tf

* Update main.tf

* Update main.tf

* Update README.md

* Update README.md

* Update CHANGELOG.md

Co-authored-by: Max Williams <max.williams@deliveryhero.com>
2020-02-27 11:36:32 +01:00
Dawid Rogaczewski
3e44835172 change default value for wait_for_cluster_cmd (#750)
* change wait_for_cluster_cmd method

change default method for wait_for_cluster_cmd from curl to wget to solve https://github.com/terraform-aws-modules/terraform-aws-eks/issues/741

* Update CHANGELOG.md

* update docs

Co-authored-by: Max Williams <max.williams@deliveryhero.com>
2020-02-27 11:31:20 +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
Thierno IB. BARRY
065158a970 fix terraform pre-commit args for terraform-docs (#714)
* fix terraform pre-commit args for terraform-docs

* fix docs with terraform-docs 0.8.x

Signed-off-by: Thierno BARRY <thierno.barry@polyconseil.fr>

* resolve confliting filesx

* update homebrew formulas before install

* update changelog
2020-01-28 18:53: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
Amit Thakkar
b70a828877 Correcting name of module (#666) 2020-01-15 08:05:10 +01:00
Thierno IB. BARRY
c5f50d5969 Re-generate docs with terraform-docs 0.7.0 and bump pre-commit-terraform version (#668)
* re-generate docs with terraform-docs 0.7.0

* bump pre-commit-terraform version
2020-01-13 14:39:59 +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
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
Eytan Hanig
ab412fb060 Add the OIDC provider ARN to outputs (#653) 2020-01-03 14:25:09 +01:00
Mukesh Gupta
7c8bcc967b Adding node group iam role arns to outputs (#641) 2019-12-20 16:50:29 +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
Alaa Qutaish
583c32d286 Add IRSA support (#632) 2019-12-19 16:38:12 +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
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
Max Williams
614d815c3c Misc doc and changelog format changes (#604)
👊
2019-11-28 15:03:26 +01:00
Stijn De Haes
9363662574 Use kubernetes provider to manage aws auth (#355)
This commit changes the way aws auth is managed. Before a local file
was used the generate the template and a null resource to apply it. This
is now switched to the terraform kubernetes provider.
2019-11-28 10:25:13 +01:00
Hwanjin Jeong
a4117177f6 Fix typo (#595)
* fix typos

* remove unnecessary comment
2019-11-18 18:10:53 +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