Skip to content
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

fix: Ensure that custom KMS key is not created if encryption is not enabled, support computed values in cluster name #2328

Merged

Conversation

csantanapr
Copy link
Contributor

@csantanapr csantanapr commented Dec 7, 2022

Description

  • Ensure that custom KMS key is not created if encryption is not enabled
  • Avoid throwing an index error when users provide their own custom launch template instead of the module creating a custom launch template
  • Support instances where a computed value is passed into the cluster name, such as using random provider resources

Motivation and Context

Breaking Changes

  • The default KMS key alias for the cluster name will be re-created but this is generally a safe process since its just an identifier. Otherwise, no breaking changes

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

@bryantbiggs bryantbiggs changed the title Fix/kms key creation fix: Ensure that custom KMS key is not created if encryption is not enabled, support computed values in cluster name Dec 7, 2022
@bryantbiggs bryantbiggs merged commit b83f6d9 into terraform-aws-modules:master Dec 7, 2022
antonbabenko pushed a commit that referenced this pull request Dec 7, 2022
### [19.0.4](v19.0.3...v19.0.4) (2022-12-07)

### Bug Fixes

* Ensure that custom KMS key is not created if encryption is not enabled, support computed values in cluster name ([#2328](#2328)) ([b83f6d9](b83f6d9))
@antonbabenko
Copy link
Member

This PR is included in version 19.0.4 🎉

@jurgen-weber-deltatre
Copy link

We still ran into this error even thought we were on the fixed version so I feel there is more to it, as an alternative and if someone else ends up here please be aware you can use your own KMS key:

  create_kms_key                  = false # disable key creation
  cluster_encryption_config       = {
    resources: [
      "secrets"
    ],
    provider_key_arn              = "my kms key ARN"
  }

spr-mweber3 pushed a commit to spring-media/terraform-aws-eks that referenced this pull request Jan 4, 2023
…nabled, support computed values in cluster name (terraform-aws-modules#2328)

Co-authored-by: Bryant Biggs <[email protected]>
Resolves undefined
Resolved undefined
Closes undefined
spr-mweber3 pushed a commit to spring-media/terraform-aws-eks that referenced this pull request Jan 4, 2023
### [19.0.4](terraform-aws-modules/terraform-aws-eks@v19.0.3...v19.0.4) (2022-12-07)

### Bug Fixes

* Ensure that custom KMS key is not created if encryption is not enabled, support computed values in cluster name ([terraform-aws-modules#2328](terraform-aws-modules#2328)) ([b83f6d9](terraform-aws-modules@b83f6d9))
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants