-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
feat: Add encryption_key_arn arg for aws_emr_studio #40771
feat: Add encryption_key_arn arg for aws_emr_studio #40771
Conversation
Community NoteVoting for Prioritization
For Submitters
|
15a79c3
to
73afc53
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTARGS='-run=TestAccEMRStudio_' PKG=emr ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/emr/... -v -count 1 -parallel 3 -run=TestAccEMRStudio_ -timeout 360m
2025/01/06 14:15:22 Initializing Terraform AWS Provider...
=== RUN TestAccEMRStudio_sso
=== PAUSE TestAccEMRStudio_sso
=== RUN TestAccEMRStudio_iam
=== PAUSE TestAccEMRStudio_iam
=== RUN TestAccEMRStudio_disappears
=== PAUSE TestAccEMRStudio_disappears
=== RUN TestAccEMRStudio_workspaceStorageEncryption
=== PAUSE TestAccEMRStudio_workspaceStorageEncryption
=== RUN TestAccEMRStudio_tags
=== PAUSE TestAccEMRStudio_tags
=== CONT TestAccEMRStudio_sso
=== CONT TestAccEMRStudio_workspaceStorageEncryption
=== CONT TestAccEMRStudio_tags
=== NAME TestAccEMRStudio_sso
acctest.go:1716: skipping test for aws/us-west-2: Error running apply: exit status 1
Error: creating EMR Studio (tf-acc-test-8281979099833700021): operation error EMR: CreateStudio, https response error StatusCode: 400, RequestID: e2df537b-67bd-4bd5-99a1-47d64776fe16, InvalidRequestException: IAM Identity Center is not enabled (Service: AWSEditors; Status Code: 400; Error Code: InvalidRequestException; Request ID: 88c8a58b-c76c-4276-b834-d1e99afd55ca; Proxy: null)
with aws_emr_studio.test,
on terraform_plugin_test.tf line 107, in resource "aws_emr_studio" "test":
107: resource "aws_emr_studio" "test" {
--- SKIP: TestAccEMRStudio_sso (19.39s)
=== CONT TestAccEMRStudio_disappears
acctest.go:1716: skipping test for aws/us-west-2: Error running apply: exit status 1
Error: creating EMR Studio (tf-acc-test-3796633636027730642): operation error EMR: CreateStudio, https response error StatusCode: 400, RequestID: 4cad826c-87fd-411d-bcda-0024038a31c7, InvalidRequestException: IAM Identity Center is not enabled (Service: AWSEditors; Status Code: 400; Error Code: InvalidRequestException; Request ID: dd08d96e-089e-4e25-8126-0dd951f39ffd; Proxy: null)
with aws_emr_studio.test,
on terraform_plugin_test.tf line 107, in resource "aws_emr_studio" "test":
107: resource "aws_emr_studio" "test" {
--- SKIP: TestAccEMRStudio_disappears (17.76s)
=== CONT TestAccEMRStudio_iam
--- PASS: TestAccEMRStudio_workspaceStorageEncryption (37.38s)
--- PASS: TestAccEMRStudio_tags (55.90s)
--- PASS: TestAccEMRStudio_iam (29.82s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/emr 72.289s
@acwwat Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.83.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! |
Description
This PR is primarily to add the
encryption_key_arn
argument to theaws_emr_studio
resource to support workspace storage encryption. While working on this PR, I also saw test cases failing because of a regression issue with eventual consistency handling. The error message for detecting eventual consistency changed, so it wasn't handled. I have fixed this issue as well.I also saw a missing policy from the IAM role. While it does not cause issue with testing Terraform per se, for it to be a fully functional test case I've added it.
Lastly, I noticed that any SSO-related test cases are skipped as my test account does not have IDC enabled. I'd imagine that this is typical for many developers. As such, I've changed all test cases that are not directly testing SSO to use the IAM auth mode instead. Consequently there is one test case
TestAccEMRStudio_sso
that I couldn't verify due to the lack of IDC - please help with testing that. Thanks.Relations
Closes #40743
References
Referred to CreateStudio for specs and wordings.
Output from Acceptance Testing
Note: I don't have an account with IDC enabled, so I cannot test that skipped use case.