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: Policy generation when ebs_csi_kms_cmk_ids is set #203

Merged
merged 2 commits into from
Mar 23, 2022

Conversation

schantaraud
Copy link
Contributor

Description

Fixed a typo causing plan/apply to fail when ebs_csi_kms_cmk_ids is set in the "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks" module.

Motivation and Context

Without this change, setting ebs_csi_kms_cmk_ids results in the following error (statement.value is 1 instead of the list of CMK ARNs):

╷
│ Error: Incorrect attribute value type
│ 
│   on .terraform/modules/[redacted].aws_ebs_csi_driver_irsa/modules/iam-role-for-service-accounts-eks/policies.tf line 259, in data "aws_iam_policy_document" "ebs_csi":
│  259:       resources = statement.value
│ 
│ Inappropriate value for attribute "resources": set of string required.
╵
╷
│ Error: Incorrect attribute value type
│ 
│   on .terraform/modules/[redacted].aws_ebs_csi_driver_irsa/modules/iam-role-for-service-accounts-eks/policies.tf line 281, in data "aws_iam_policy_document" "ebs_csi":
│  281:       resources = statement.value
│ 
│ Inappropriate value for attribute "resources": set of string required.

Breaking Changes

None

How Has This Been Tested?

  • I have tested and validated these changes using one or more of the provided examples/* projects
    Tested, with and without setting ebs_csi_kms_cmk_ids, as well as with 0, 1 and multiple values.

@schantaraud schantaraud changed the title Fixed policy generation when ebs_csi_kms_cmk_ids is set fix: policy generation when ebs_csi_kms_cmk_ids is set Mar 9, 2022
@schantaraud schantaraud changed the title fix: policy generation when ebs_csi_kms_cmk_ids is set Fix: policy generation when ebs_csi_kms_cmk_ids is set Mar 9, 2022
@schantaraud schantaraud changed the title Fix: policy generation when ebs_csi_kms_cmk_ids is set fix: Policy generation when ebs_csi_kms_cmk_ids is set Mar 9, 2022
@bryantbiggs
Copy link
Member

thanks for the PR @schantaraud - we should update the example to include ebs_csi_kms_cmk_ids so that we can validate this change and avoid any regressions going forward

@thuandt
Copy link

thuandt commented Mar 21, 2022

Tested with my cluster <3 Thanks @schantaraud

@bryantbiggs
Copy link
Member

Closes #211

Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antonbabenko good to go - I can catch up the example later for this

@antonbabenko antonbabenko merged commit e2b4054 into terraform-aws-modules:master Mar 23, 2022
antonbabenko pushed a commit that referenced this pull request Mar 23, 2022
## [4.15.0](v4.14.0...v4.15.0) (2022-03-23)

### Features

* Made it clear that we stand with Ukraine ([8e2b836](8e2b836))

### Bug Fixes

* Policy generation when `ebs_csi_kms_cmk_ids` is set ([#203](#203)) ([e2b4054](e2b4054))
@antonbabenko
Copy link
Member

This PR is included in version 4.15.0 🎉

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

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 Nov 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants