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 Sagemaker Domain KMS Key ID fields #32661

Merged
merged 3 commits into from
Aug 15, 2023

Conversation

bpmcd
Copy link
Contributor

@bpmcd bpmcd commented Jul 24, 2023

Description

Fix SageMaker Studio Domain settings for KMS Keys. The current implementation enforces the usage of ARNs, but the service requires just the Key ID.

Relations

Closes #23429

References

Output from Acceptance Testing

make testacc TESTS=TestAccSageMaker_serial/Domain PKG=sagemaker
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMaker_serial/Domain'  -timeout 180m
=== RUN   TestAccSageMaker_serial
=== PAUSE TestAccSageMaker_serial
=== CONT  TestAccSageMaker_serial
=== RUN   TestAccSageMaker_serial/Domain
=== RUN   TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_defaultResourceAndCustomImage
    domain_test.go:551: Environment variable SAGEMAKER_IMAGE_VERSION_BASE_IMAGE is not set
=== RUN   TestAccSageMaker_serial/Domain/jupyterServerAppSettings
=== RUN   TestAccSageMaker_serial/Domain/tensorboardAppSettingsWithImage
=== RUN   TestAccSageMaker_serial/Domain/defaultUserSettingsUpdated
=== RUN   TestAccSageMaker_serial/Domain/modelRegisterSettings
=== RUN   TestAccSageMaker_serial/Domain/domainSettings
=== RUN   TestAccSageMaker_serial/Domain/rSessionAppSettings
=== RUN   TestAccSageMaker_serial/Domain/tags
=== RUN   TestAccSageMaker_serial/Domain/kernelGatewayAppSettings
=== RUN   TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_lifecycleConfig
=== RUN   TestAccSageMaker_serial/Domain/canvas
=== RUN   TestAccSageMaker_serial/Domain/rStudioServerProAppSettings
=== RUN   TestAccSageMaker_serial/Domain/code
=== RUN   TestAccSageMaker_serial/Domain/basic
=== RUN   TestAccSageMaker_serial/Domain/tensorboardAppSettings
=== RUN   TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_customImage
    domain_test.go:512: Environment variable SAGEMAKER_IMAGE_VERSION_BASE_IMAGE is not set
=== RUN   TestAccSageMaker_serial/Domain/kms
=== RUN   TestAccSageMaker_serial/Domain/securityGroup
=== RUN   TestAccSageMaker_serial/Domain/sharingSettings
=== RUN   TestAccSageMaker_serial/Domain/spaceSettingsKernelGatewayAppSettings
=== RUN   TestAccSageMaker_serial/Domain/disappears
--- PASS: TestAccSageMaker_serial (4698.69s)
    --- PASS: TestAccSageMaker_serial/Domain (4698.69s)
        --- SKIP: TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_defaultResourceAndCustomImage (0.00s)
        --- PASS: TestAccSageMaker_serial/Domain/jupyterServerAppSettings (249.49s)
        --- PASS: TestAccSageMaker_serial/Domain/tensorboardAppSettingsWithImage (306.61s)
        --- PASS: TestAccSageMaker_serial/Domain/defaultUserSettingsUpdated (266.21s)
        --- PASS: TestAccSageMaker_serial/Domain/modelRegisterSettings (247.70s)
        --- PASS: TestAccSageMaker_serial/Domain/domainSettings (261.84s)
        --- PASS: TestAccSageMaker_serial/Domain/rSessionAppSettings (247.43s)
        --- PASS: TestAccSageMaker_serial/Domain/tags (245.58s)
        --- PASS: TestAccSageMaker_serial/Domain/kernelGatewayAppSettings (248.24s)
        --- PASS: TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_lifecycleConfig (247.24s)
        --- PASS: TestAccSageMaker_serial/Domain/canvas (247.39s)
        --- PASS: TestAccSageMaker_serial/Domain/rStudioServerProAppSettings (197.71s)
        --- PASS: TestAccSageMaker_serial/Domain/code (247.58s)
        --- PASS: TestAccSageMaker_serial/Domain/basic (247.34s)
        --- PASS: TestAccSageMaker_serial/Domain/tensorboardAppSettings (137.62s)
        --- SKIP: TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_customImage (0.00s)
        --- PASS: TestAccSageMaker_serial/Domain/kms (247.90s)
        --- PASS: TestAccSageMaker_serial/Domain/securityGroup (421.16s)
        --- PASS: TestAccSageMaker_serial/Domain/sharingSettings (227.58s)
        --- PASS: TestAccSageMaker_serial/Domain/spaceSettingsKernelGatewayAppSettings (131.16s)
        --- PASS: TestAccSageMaker_serial/Domain/disappears (272.89s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker	4702.942s
...

@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/sagemaker Issues and PRs that pertain to the sagemaker service. size/XS Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. labels Jul 24, 2023
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @bpmcd 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 24, 2023
@johnsonaj johnsonaj self-assigned this Aug 15, 2023
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 15, 2023
Copy link
Contributor

@johnsonaj johnsonaj left a 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=TestAccSageMaker_serial/Domain/^basic\|TestAccSageMaker_serial/Domain/^sharingSettings\|TestAccSageMaker_serial/Domain/^kms' PKG=sagemaker

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sagemaker/... -v -count 1 -parallel 20  -run=TestAccSageMaker_serial/Domain/^basic\|TestAccSageMaker_serial/Domain/^sharingSettings\|TestAccSageMaker_serial/Domain/^kms -timeout 180m
    --- PASS: TestAccSageMaker_serial (920.78s)
    --- PASS: TestAccSageMaker_serial/Domain (920.78s)
        --- PASS: TestAccSageMaker_serial/Domain/sharingSettings (425.47s)
        --- PASS: TestAccSageMaker_serial/Domain/basic (242.71s)
        --- PASS: TestAccSageMaker_serial/Domain/kms (252.60s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker	923.825s

@johnsonaj
Copy link
Contributor

@bpmcd thank you for the contribution! 🎉

@johnsonaj johnsonaj merged commit a4393f9 into hashicorp:main Aug 15, 2023
34 checks passed
@github-actions github-actions bot added this to the v5.13.0 milestone Aug 15, 2023
@github-actions github-actions bot removed the bug Addresses a defect in current functionality. label Aug 18, 2023
@github-actions
Copy link

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

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 Sep 18, 2023
@justinretzolk justinretzolk added the bug Addresses a defect in current functionality. label Feb 10, 2024
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. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/sagemaker Issues and PRs that pertain to the sagemaker service. size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_sagemaker_domain sharing settings s3 kms key id fails with kms id expecting kms arn
3 participants