-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
[Bug]: Resource aws_eks_access_entry only updates group OR username #36480
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
I'm happy to try to fix this. |
This functionality has been released in v5.42.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Terraform Core Version
1.7.5
AWS Provider Version
5.41.0
Affected Resource(s)
resource aws_eks_access_entry
Expected Behavior
I have defined an aws_eks_access_entry with the following configuration:
I would like to be able to make independent changes to either the user_name attribute or the kubernetes_groups attribute. If one of those values is altered, that's the only change I would like to see in the AWS console.
Actual Behavior
When changing either the user_name or kubernetes_groups attribute values, this value gets updated while the value for the other attribute gets reverted to default. For example:
When changing the kubernetes_groups in the following resource:
to:
And applying this change, the user_name gets reverted back to the default rather than maintaining what is configured in the resource. The same happens when having an existing kubernetes_groups list defined and altering the user_name attribute. This would only update the user_name and remove any group mappins.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Debug Output
Initial create:
Then after updating the groups attribute only:
Panic Output
No response
Important Factoids
No response
References
When testing with aws-cli we see a similair behaviour, when running the following:
Then when changing the username:
We can see the group is wiped. This makes me believe that if both arguments are defined in TF, they should both be passed al the time. When checking the code of the TF provider however, we can see it appears to be only passed if it contains a change:
https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/eks/access_entry.go#L186
https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/eks/access_entry.go#L190
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: