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

r/sagemaker_space - new resource #28154

Merged
merged 11 commits into from
Dec 12, 2022
Merged

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Dec 3, 2022

Description

Relations

Closes #27265
Closes #27990

References

Output from Acceptance Testing

$ make testacc TESTS=TestAccSageMaker_serial/Space

--- PASS: TestAccSageMaker_serial (1666.88s)
    --- PASS: TestAccSageMaker_serial/Space (1666.88s)
        --- PASS: TestAccSageMaker_serial/Space/basic (271.61s)
        --- PASS: TestAccSageMaker_serial/Space/disappears (324.01s)
        --- PASS: TestAccSageMaker_serial/Space/tags (265.95s)
        --- PASS: TestAccSageMaker_serial/Space/kernelGatewayAppSettings (269.04s)
        --- PASS: TestAccSageMaker_serial/Space/kernelGatewayAppSettings_lifecycleConfig (267.09s)
        --- PASS: TestAccSageMaker_serial/Space/jupyterServerAppSettings (269.17s)


--- PASS: TestAccSageMaker_serial (5300.99s)
    --- PASS: TestAccSageMaker_serial/Domain (5300.99s)
        --- PASS: TestAccSageMaker_serial/Domain/sharingSettings (444.31s)
        --- PASS: TestAccSageMaker_serial/Domain/defaultUserSettingsUpdated (305.97s)
        --- PASS: TestAccSageMaker_serial/Domain/tensorboardAppSettingsWithImage (324.92s)
        --- PASS: TestAccSageMaker_serial/Domain/securityGroup (298.91s)
        --- PASS: TestAccSageMaker_serial/Domain/domainSettings (293.67s)
        --- PASS: TestAccSageMaker_serial/Domain/rSessionAppSettings (261.86s)
        --- PASS: TestAccSageMaker_serial/Domain/tags (256.94s)
        --- PASS: TestAccSageMaker_serial/Domain/kernelGatewayAppSettings (264.39s)
        --- PASS: TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_lifecycleConfig (262.01s)
        --- PASS: TestAccSageMaker_serial/Domain/basic (264.71s)
        --- PASS: TestAccSageMaker_serial/Domain/disappears (327.10s)
        --- PASS: TestAccSageMaker_serial/Domain/spaceSettingsKernelGatewayAppSettings (305.11s)
        --- PASS: TestAccSageMaker_serial/Domain/kms (428.08s)
        --- PASS: TestAccSageMaker_serial/Domain/canvas (468.37s)
        --- PASS: TestAccSageMaker_serial/Domain/code (265.32s)
        --- PASS: TestAccSageMaker_serial/Domain/tensorboardAppSettings (264.47s)
        --- PASS: TestAccSageMaker_serial/Domain/jupyterServerAppSettings (264.84s)

--- PASS: TestAccSageMaker_serial (3120.53s)
    --- PASS: TestAccSageMaker_serial/App (3120.52s)
        --- PASS: TestAccSageMaker_serial/App/resourceSpec (410.41s)
        --- PASS: TestAccSageMaker_serial/App/resourceSpecLifecycle (545.64s)
        --- PASS: TestAccSageMaker_serial/App/space (484.87s)
        --- PASS: TestAccSageMaker_serial/App/basic (646.75s)
        --- PASS: TestAccSageMaker_serial/App/disappears (445.85s)
        --- PASS: TestAccSageMaker_serial/App/tags (587.00s)

@github-actions
Copy link

github-actions bot commented Dec 3, 2022

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 needs-triage Waiting for first response or review from a maintainer. size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/sagemaker Issues and PRs that pertain to the sagemaker service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 3, 2022
@DrFaust92 DrFaust92 added enhancement Requests to existing resources that expand the functionality or scope. new-resource Introduces a new resource. and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 3, 2022
@github-actions github-actions bot added the sweeper Pertains to changes to or issues with the sweeper. label Dec 3, 2022
@DrFaust92 DrFaust92 marked this pull request as ready for review December 3, 2022 17:56
@DrFaust92
Copy link
Collaborator Author

should also resolve #27265

@pawelpesz
Copy link

If I may comment, because I'm also currently struggling with getting SageMaker to work when its resources are created with Terraform.
I'm afraid creating SageMaker space will not fix #27990 completely because domains with SSO (aka IAM Identity Center) do not support it.
Here's the error I'm getting when attempting to create a space with AWS CLI (v2.9.4):

$ aws sagemaker create-space --domain-id ztrgdmgpfeuu --space-name default

An error occurred (ValidationException) when calling the CreateSpace operation: Domains with AWS IAM Identity Center (successor to AWS SSO) enabled do not support Spaces.

@DrFaust92
Copy link
Collaborator Author

#27990 is not related to your issue, as the example in that issue is IAM. this is not a TF issue as you show an error from CLI for the service to not support this combo (yet)

Copy link
Contributor

@ewbankkit ewbankkit 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/App\|TestAccSageMaker_serial/Domain\|TestAccSageMaker_serial/Space\|TestAccSageMaker_serial/UserProfile' 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/App\|TestAccSageMaker_serial/Domain\|TestAccSageMaker_serial/Space\|TestAccSageMaker_serial/UserProfile -timeout 180m
=== RUN   TestAccSageMaker_serial
=== RUN   TestAccSageMaker_serial/Space
=== RUN   TestAccSageMaker_serial/Space/kernelGatewayAppSettings_imageConfig
    space_test.go:161: Environment variable SAGEMAKER_IMAGE_VERSION_BASE_IMAGE is not set
=== RUN   TestAccSageMaker_serial/Space/jupyterServerAppSettings
=== RUN   TestAccSageMaker_serial/Space/basic
=== RUN   TestAccSageMaker_serial/Space/disappears
=== RUN   TestAccSageMaker_serial/Space/tags
=== RUN   TestAccSageMaker_serial/Space/kernelGatewayAppSettings
=== RUN   TestAccSageMaker_serial/Space/kernelGatewayAppSettings_lifecycleConfig
=== RUN   TestAccSageMaker_serial/UserProfile
=== RUN   TestAccSageMaker_serial/UserProfile/tensorboardAppSettingsWithImage
=== RUN   TestAccSageMaker_serial/UserProfile/kernelGatewayAppSettings
=== RUN   TestAccSageMaker_serial/UserProfile/kernelGatewayAppSettings_lifecycleConfig
=== RUN   TestAccSageMaker_serial/UserProfile/basic
=== RUN   TestAccSageMaker_serial/UserProfile/disappears
=== RUN   TestAccSageMaker_serial/UserProfile/tags
=== RUN   TestAccSageMaker_serial/UserProfile/tensorboardAppSettings
=== RUN   TestAccSageMaker_serial/UserProfile/kernelGatewayAppSettings_imageConfig
    user_profile_test.go:233: Environment variable SAGEMAKER_IMAGE_VERSION_BASE_IMAGE is not set
=== RUN   TestAccSageMaker_serial/UserProfile/jupyterServerAppSettings
=== RUN   TestAccSageMaker_serial/App
=== RUN   TestAccSageMaker_serial/App/space
=== RUN   TestAccSageMaker_serial/App/basic
=== RUN   TestAccSageMaker_serial/App/disappears
=== RUN   TestAccSageMaker_serial/App/tags
=== RUN   TestAccSageMaker_serial/App/resourceSpec
=== RUN   TestAccSageMaker_serial/App/resourceSpecLifecycle
=== RUN   TestAccSageMaker_serial/Domain
=== RUN   TestAccSageMaker_serial/Domain/code
=== RUN   TestAccSageMaker_serial/Domain/disappears
=== RUN   TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_lifecycleConfig
=== RUN   TestAccSageMaker_serial/Domain/canvas
=== RUN   TestAccSageMaker_serial/Domain/domainSettings
=== RUN   TestAccSageMaker_serial/Domain/rSessionAppSettings
=== RUN   TestAccSageMaker_serial/Domain/spaceSettingsKernelGatewayAppSettings
=== RUN   TestAccSageMaker_serial/Domain/basic
=== RUN   TestAccSageMaker_serial/Domain/tensorboardAppSettingsWithImage
=== RUN   TestAccSageMaker_serial/Domain/securityGroup
=== RUN   TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_customImage
    domain_test.go:431: Environment variable SAGEMAKER_IMAGE_VERSION_BASE_IMAGE is not set
=== RUN   TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_defaultResourceAndCustomImage
    domain_test.go:469: Environment variable SAGEMAKER_IMAGE_VERSION_BASE_IMAGE is not set
=== RUN   TestAccSageMaker_serial/Domain/kms
=== RUN   TestAccSageMaker_serial/Domain/defaultUserSettingsUpdated
=== RUN   TestAccSageMaker_serial/Domain/tags
=== RUN   TestAccSageMaker_serial/Domain/tensorboardAppSettings
=== RUN   TestAccSageMaker_serial/Domain/kernelGatewayAppSettings
=== RUN   TestAccSageMaker_serial/Domain/jupyterServerAppSettings
=== RUN   TestAccSageMaker_serial/Domain/sharingSettings
--- PASS: TestAccSageMaker_serial (10590.57s)
    --- PASS: TestAccSageMaker_serial/Space (1540.71s)
        --- SKIP: TestAccSageMaker_serial/Space/kernelGatewayAppSettings_imageConfig (0.00s)
        --- PASS: TestAccSageMaker_serial/Space/jupyterServerAppSettings (246.38s)
        --- PASS: TestAccSageMaker_serial/Space/basic (256.37s)
        --- PASS: TestAccSageMaker_serial/Space/disappears (296.01s)
        --- PASS: TestAccSageMaker_serial/Space/tags (253.46s)
        --- PASS: TestAccSageMaker_serial/Space/kernelGatewayAppSettings (245.38s)
        --- PASS: TestAccSageMaker_serial/Space/kernelGatewayAppSettings_lifecycleConfig (243.11s)
    --- PASS: TestAccSageMaker_serial/UserProfile (2049.16s)
        --- PASS: TestAccSageMaker_serial/UserProfile/tensorboardAppSettingsWithImage (260.87s)
        --- PASS: TestAccSageMaker_serial/UserProfile/kernelGatewayAppSettings (247.08s)
        --- PASS: TestAccSageMaker_serial/UserProfile/kernelGatewayAppSettings_lifecycleConfig (252.18s)
        --- PASS: TestAccSageMaker_serial/UserProfile/basic (253.29s)
        --- PASS: TestAccSageMaker_serial/UserProfile/disappears (289.12s)
        --- PASS: TestAccSageMaker_serial/UserProfile/tags (244.39s)
        --- PASS: TestAccSageMaker_serial/UserProfile/tensorboardAppSettings (247.07s)
        --- SKIP: TestAccSageMaker_serial/UserProfile/kernelGatewayAppSettings_imageConfig (0.00s)
        --- PASS: TestAccSageMaker_serial/UserProfile/jupyterServerAppSettings (255.16s)
    --- PASS: TestAccSageMaker_serial/App (2715.03s)
        --- PASS: TestAccSageMaker_serial/App/space (477.49s)
        --- PASS: TestAccSageMaker_serial/App/basic (474.46s)
        --- PASS: TestAccSageMaker_serial/App/disappears (431.27s)
        --- PASS: TestAccSageMaker_serial/App/tags (478.21s)
        --- PASS: TestAccSageMaker_serial/App/resourceSpec (404.81s)
        --- PASS: TestAccSageMaker_serial/App/resourceSpecLifecycle (448.79s)
    --- PASS: TestAccSageMaker_serial/Domain (4285.67s)
        --- PASS: TestAccSageMaker_serial/Domain/code (239.00s)
        --- PASS: TestAccSageMaker_serial/Domain/disappears (268.90s)
        --- PASS: TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_lifecycleConfig (237.78s)
        --- PASS: TestAccSageMaker_serial/Domain/canvas (240.28s)
        --- PASS: TestAccSageMaker_serial/Domain/domainSettings (259.04s)
        --- PASS: TestAccSageMaker_serial/Domain/rSessionAppSettings (255.70s)
        --- PASS: TestAccSageMaker_serial/Domain/spaceSettingsKernelGatewayAppSettings (262.76s)
        --- PASS: TestAccSageMaker_serial/Domain/basic (250.77s)
        --- PASS: TestAccSageMaker_serial/Domain/tensorboardAppSettingsWithImage (297.71s)
        --- PASS: TestAccSageMaker_serial/Domain/securityGroup (261.55s)
        --- SKIP: TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_customImage (0.00s)
        --- SKIP: TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_defaultResourceAndCustomImage (0.00s)
        --- PASS: TestAccSageMaker_serial/Domain/kms (238.33s)
        --- PASS: TestAccSageMaker_serial/Domain/defaultUserSettingsUpdated (260.87s)
        --- PASS: TestAccSageMaker_serial/Domain/tags (235.37s)
        --- PASS: TestAccSageMaker_serial/Domain/tensorboardAppSettings (238.65s)
        --- PASS: TestAccSageMaker_serial/Domain/kernelGatewayAppSettings (247.71s)
        --- PASS: TestAccSageMaker_serial/Domain/jupyterServerAppSettings (251.72s)
        --- PASS: TestAccSageMaker_serial/Domain/sharingSettings (239.54s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker	10595.699s

@ewbankkit
Copy link
Contributor

@DrFaust92 Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit a2586ba into hashicorp:main Dec 12, 2022
@github-actions github-actions bot added this to the v4.47.0 milestone Dec 12, 2022
@github-actions
Copy link

This functionality has been released in v4.47.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 Jan 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/sagemaker Issues and PRs that pertain to the sagemaker service. size/XL Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
3 participants