Commit Graph

505 Commits

Author SHA1 Message Date
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
senthil Vivekanandan
c54ce911dc fix: Set IAM Path for cluster_elb_sl_role_creation IAM policy (#1045) 2020-10-12 13:51:28 +02:00
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
Thierno IB. BARRY
d6f3a4265f chore: update changelog for v13.0.0 release (#1034) 2020-10-06 09:39:11 +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
Guillaume GILL
93614b329d improvement: Make the cpu_credits optional for workers launch template (#1030)
NOTES: `credit_specification` for worker groups launch template can now be set to `null` so that we can use non burstable EC2 families
2020-10-05 15:24:47 +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
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
Abhinav Sonkar
c4e95b3b04 docs: Add ec2:CreateVpcEndpoint action to minimum permission list (#1022) 2020-10-04 21:19:05 +02:00
Lorenzo Aiello
f0ae6c6751 feat: Dynamic Partition for IRSA to support AWS-CN Deployments (#1028) 2020-10-04 20:49:41 +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
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
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
Thomas O'Neill
c508d12b69 docs: Mixed spot + on-demand instance documentation (#967)
* Add example for lauch config with mixed lifecycles

* Set what on-demand instance is

* Tweak wording

Co-authored-by: Thomas O'Neill <toneill@new-innov.com>
Co-authored-by: Daniel Piddock <daniel.piddock@teamcmp.com>
2020-08-14 15:58:34 +02:00
Giuseppe Crinò
1c81227044 docs: Describe key_name is about AWS EC2 key pairs (#970) 2020-08-14 15:27:46 +02:00
Jürgen W
f45b5a1d46 fix: random_pet with LT workers under 0.13.0 (#940)
Fix for:
Error: Provider produced inconsistent final plan

When expanding the plan for module.eks.random_pet.workers_launch_template[0]
to include new values learned so far during apply, provider
"registry.terraform.io/hashicorp/random" changed the planned action from
CreateThenDelete to DeleteThenCreate.
2020-08-14 15:23:17 +02:00
Daniel Piddock
415cfca9af ci: fix CI lint job (#973)
Module used by an example does not allow use with 0.13 yet. Lock to
latest version of 0.12. No 0.12 floating tag :(
2020-08-12 16:10:31 +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 Piddock
3d2f7d28c1 chore: update changelog for release 12.2.0 (#948) 2020-07-13 21:31:56 +02:00
Daniel Piddock
7d86a6c757 docs: Update required IAM permissions list (#936)
NodeGroups, Fargate, EKS tagging, KMS
2020-07-13 21:22:41 +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 Potter
b0ebef69b3 fix: Strip user Name tag from asg_tags #946) 2020-07-12 17:40:27 +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
Thierno IB. BARRY
616d30ec67 feat: Add a homemade depends_on for MNG submodule to ensure ordering of resource creation (#867) 2020-06-28 02:31:23 +02:00
Daniel Piddock
1e4a908a95 docs: Improve FAQ on how to deploy from Windows (#927) 2020-06-26 17:40:34 +02:00
Daniel Piddock
60b494049b docs: autoscaler X.Y version must match (#928) 2020-06-26 17:39:49 +02:00
Tim Robinson
c4edc6fbcc fix: Get on_demand_allocation_strategy from local.workers_group_defaults when deciding to use mixed_instances_policy (#908) 2020-06-24 09:31:05 +02:00
Ariel Viñas
348f441221 fix: remove unnecessary conditional in private access security group (#915) 2020-06-10 12:38:56 +02:00
Daniel Piddock
f2c4383719 chore: update changelog for release 12.1.0 (#910) 2020-06-06 11:46:37 +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
graywolf-at-work
05cd78593a fix: Ensure kubeconfig ends with \n (#880)
In order to be a text file according to POSIX, file needs to be composed of
text lines. Text line is defined as sequence of characters ending in \n. Sadly,
`~}` did strip everything including the \n, so the kubeconfing did not end
with a new line. Output empty string at the end to make sure of it.
2020-06-02 11:24:39 +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
Brandon McNama
7ffe5fa88f fix: Work around path bug in aws-iam-authenticator (#894)
* fix: Work around path bug in aws-iam-authenticator

`aws-iam-authenticator` has an open issue where it will not recognize
IAM roles that include paths. This change causes the path supplied to
`var.iam_path` to be stripped when generating the `aws-auth` ConfigMap
in order to work around this.

https://github.com/kubernetes-sigs/aws-iam-authenticator/issues/153
https://github.com/aws/containers-roadmap/issues/926
2020-05-30 22:25:50 +02:00
Daniel Piddock
c748899d0e cluster_id blocks on wait_for_cluster (#890) 2020-05-29 17:45:24 +02:00
Daniel Piddock
444343553c docs: Update FAQ (#891) 2020-05-29 17:29:08 +02:00
Thierno IB. BARRY
d4f3924056 chore: update changelog and prepare release 12.0.0 (#871) 2020-05-09 20:52:42 +02:00
Daniel Piddock
bb822a1e56 fix: Fix Launch Templates error with aws 2.61.0 (#875) 2020-05-09 19:58:38 +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
Thierno IB. BARRY
527d4bd3f5 fix: Use splat syntax for cluster name to avoid (known after apply) in managed node groups (#868) 2020-05-07 09:17:05 +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
Thierno IB. BARRY
9bfdba9fb8 chore: Move all locals in locals.tf (#865) 2020-05-06 14:00:20 +02:00
Thierno IB. BARRY
4a8c79053a docs: Remove useless template provider in examples (#863) 2020-05-06 12:16:39 +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