Skip to content

feat: Add support for deletion protection #3475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 15, 2025

Conversation

tiagovmvieira
Copy link
Contributor

@tiagovmvieira tiagovmvieira commented Aug 9, 2025

Description

This PR adds support for EKS cluster deletion protection configuration through a new enable_deletion_protection variable. This feature allows users to enable AWS's built-in deletion protection safeguard for EKS clusters, helping prevent accidental or unauthorized deletion of critical infrastructure.

hashicorp/terraform-provider-aws#43779

Motivation and Context

EKS cluster deletion protection is already a supported feature in AWS, providing a valuable security safeguard that helps prevent accidental deletion of critical Kubernetes infrastructure. This enhancement addresses user requests for better operational safety and aligns with AWS security best practices.

Dependency: This PR requires the AWS Terraform provider to support managing EKS deletion protection through Terraform. While AWS already supports this functionality natively, the Terraform provider implementation is pending in the following PR. This module enhancement will be ready to use once that provider update is released.

Breaking Changes

None. This is a backward-compatible addition. The new enable_deletion_protection variable defaults to false, preserving existing behavior for current module users.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@tiagovmvieira
Copy link
Contributor Author

pre-commit hook is failing in the tflint stage, cause this argument is not supported yet

@bryantbiggs
Copy link
Member

@tiagovmvieira provider support should land tomorrow with version v6.9 FYI - if you want to update, I can review and we can merge once that provider version is available. Don't worry about the pre-commit CI checks failing, I can trigger those to re-execute. However, we do bump the provider version throughout the repo, including sub-modules, examples, and tests

@tiagovmvieira
Copy link
Contributor Author

@bryantbiggs I have bumped the provider version in both the root versions.tf and examples/eks-auto-mode/versions.tf. I have also included the new argument in the eks-auto-mode example.

Please do let me know, if there's anything missing

Thanks :)

@bryantbiggs bryantbiggs changed the title feat: Add support for deletion protection functionality in the cluster feat: Add support for deletion protection Aug 15, 2025
@bryantbiggs bryantbiggs merged commit 83c9cd1 into terraform-aws-modules:master Aug 15, 2025
21 checks passed
antonbabenko pushed a commit that referenced this pull request Aug 15, 2025
## [21.1.0](v21.0.9...v21.1.0) (2025-08-15)

### Features

* Add support for deletion protection functionality in the cluster ([#3475](#3475)) ([83c9cd1](83c9cd1))
@antonbabenko
Copy link
Member

This PR is included in version 21.1.0 🎉

@tiagovmvieira
Copy link
Contributor Author

tiagovmvieira commented Aug 15, 2025

Thanks for your help @bryantbiggs @antonbabenko 👍🏼

Happy to contribute ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants