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

aws_emr_studio_session_mapping not populating identity_id #26369

Closed
RajputVaibhav opened this issue Aug 18, 2022 · 2 comments · Fixed by #32416
Closed

aws_emr_studio_session_mapping not populating identity_id #26369

RajputVaibhav opened this issue Aug 18, 2022 · 2 comments · Fixed by #32416
Labels
bug Addresses a defect in current functionality. service/emr Issues and PRs that pertain to the emr service.
Milestone

Comments

@RajputVaibhav
Copy link

Overview

Code Snippet

resource "aws_emr_studio_session_mapping" "sso_group" {
  count                 = length(var.sso_groups)
  studio_id             = aws_emr_studio.this.id
  identity_type         = "GROUP"
  identity_name         = element(var.sso_groups, count.index)
  session_policy_arn    = aws_iam_policy.user_role_default_policy.arn
}

Output

Error: error reading EMR Studio Session Mapping (es-XXXXXXXXXXXXXX:GROUP:<group_name_here>): InvalidRequestException: IdentityId is invalid (Service: AWSEditors; Status Code: 400; Error Code: InvalidRequestException; Request ID: XXXXXXX-XXXX-XXXX-XXXXX-XXXXXXXXXXXX; Proxy: null)

Additional Info

In the terraform state, the resource gets added but the identity_id is set to null.
And on AWS console, I see that the user is added successfully. But when I re-run the plan, terraform tries to add the resource again and this time fails with the following error

│ Error: error creating EMR Studio Session Mapping: InvalidRequestException: Studio session mapping already exists. (Service: AWSEditors; Status Code: 400; Error Code: InvalidRequestException; Request ID: XXXXXX-XXXX-XXXX-XXXX-XXXXXXX; Proxy: null)

SIDE NOTE: I have tried adding the mapping using aws cli aws emr create-studio-session-mapping with the same user and it went fine. So i can safely say that the user has enough permissions.


Versions

Terraform : v0.15
aws provider : v4.26.0

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/emr Issues and PRs that pertain to the emr service. labels Aug 18, 2022
@breathingdust breathingdust added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 18, 2022
@github-actions github-actions bot added this to the v5.11.0 milestone Jul 28, 2023
@github-actions
Copy link

github-actions bot commented Aug 3, 2023

This functionality has been released in v5.11.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!

@github-actions
Copy link

github-actions bot commented Sep 3, 2023

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.
If you have found a problem that seems similar to this, 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 Sep 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/emr Issues and PRs that pertain to the emr service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants