mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-14 06:15:24 +01:00
feat!: Removed support for launch configuration and replace count with for_each (#1680)
This commit is contained in:
1
.github/CONTRIBUTING.md
vendored
1
.github/CONTRIBUTING.md
vendored
@@ -31,4 +31,3 @@ To generate changelog, Pull Requests or Commits must have semantic and must foll
|
||||
- `chore:` for chores stuff
|
||||
|
||||
The `chore` prefix skipped during changelog generation. It can be used for `chore: update changelog` commit message by example.
|
||||
|
||||
|
||||
65
.github/UPGRADE-17.0.md
vendored
Normal file
65
.github/UPGRADE-17.0.md
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
# How to handle the terraform-aws-eks module upgrade
|
||||
|
||||
## Upgrade module to v17.0.0 for Managed Node Groups
|
||||
|
||||
In this release, we now decided to remove random_pet resources in Managed Node Groups (MNG). Those were used to recreate MNG if something changed. But they were causing a lot of issues. To upgrade the module without recreating your MNG, you will need to explicitly reuse their previous name and set them in your MNG `name` argument.
|
||||
|
||||
1. Run `terraform apply` with the module version v16.2.0
|
||||
2. Get your worker group names
|
||||
|
||||
```shell
|
||||
~ terraform state show 'module.eks.module.node_groups.aws_eks_node_group.workers["example"]' | grep node_group_name
|
||||
node_group_name = "test-eks-mwIwsvui-example-sincere-squid"
|
||||
```
|
||||
|
||||
3. Upgrade your module and configure your node groups to use existing names
|
||||
|
||||
```hcl
|
||||
module "eks" {
|
||||
source = "terraform-aws-modules/eks/aws"
|
||||
version = "17.0.0"
|
||||
|
||||
cluster_name = "test-eks-mwIwsvui"
|
||||
cluster_version = "1.20"
|
||||
# ...
|
||||
|
||||
node_groups = {
|
||||
example = {
|
||||
name = "test-eks-mwIwsvui-example-sincere-squid"
|
||||
|
||||
# ...
|
||||
}
|
||||
}
|
||||
# ...
|
||||
}
|
||||
```
|
||||
|
||||
4. Run `terraform plan`, you shoud see that only `random_pets` will be destroyed
|
||||
|
||||
```shell
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# module.eks.module.node_groups.random_pet.node_groups["example"] will be destroyed
|
||||
- resource "random_pet" "node_groups" {
|
||||
- id = "sincere-squid" -> null
|
||||
- keepers = {
|
||||
- "ami_type" = "AL2_x86_64"
|
||||
- "capacity_type" = "SPOT"
|
||||
- "disk_size" = "50"
|
||||
- "iam_role_arn" = "arn:aws:iam::123456789123:role/test-eks-mwIwsvui20210527220853611600000009"
|
||||
- "instance_types" = "t3.large"
|
||||
- "key_name" = ""
|
||||
- "node_group_name" = "test-eks-mwIwsvui-example"
|
||||
- "source_security_group_ids" = ""
|
||||
- "subnet_ids" = "subnet-xxxxxxxxxxxx|subnet-xxxxxxxxxxxx|subnet-xxxxxxxxxxxx"
|
||||
} -> null
|
||||
- length = 2 -> null
|
||||
- separator = "-" -> null
|
||||
}
|
||||
|
||||
Plan: 0 to add, 0 to change, 1 to destroy.
|
||||
```
|
||||
|
||||
5. If everything sounds good to you, run `terraform apply`
|
||||
|
||||
After the first apply, we recommand you to create a new node group and let the module use the `node_group_name_prefix` (by removing the `name` argument) to generate names and avoid collision during node groups re-creation if needed, because the lifce cycle is `create_before_destroy = true`.
|
||||
1
.github/images/security_groups.svg
vendored
Normal file
1
.github/images/security_groups.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 81 KiB |
1
.github/images/user_data.svg
vendored
Normal file
1
.github/images/user_data.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 32 KiB |
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -7,6 +7,7 @@ on:
|
||||
- main
|
||||
- master
|
||||
paths:
|
||||
- '**/*.tpl'
|
||||
- '**/*.py'
|
||||
- '**/*.tf'
|
||||
|
||||
|
||||
2
.github/workflows/stale-actions.yaml
vendored
2
.github/workflows/stale-actions.yaml
vendored
@@ -29,4 +29,4 @@ jobs:
|
||||
days-before-close: 10
|
||||
delete-branch: true
|
||||
close-issue-message: This issue was automatically closed because of stale in 10 days
|
||||
close-pr-message: This PR was automatically closed because of stale in 10 days
|
||||
close-pr-message: This PR was automatically closed because of stale in 10 days
|
||||
|
||||
Reference in New Issue
Block a user