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/aws_sagemaker_domain: add studio_web_portal_settings and default_s… #38457

Conversation

deepakbshetty
Copy link
Contributor

@deepakbshetty deepakbshetty commented Jul 21, 2024

Description

r/aws_sagemaker_domain
Add default_user_settings.studio_web_portal_settings block
Add default_space_settings.jupyter_lab_app_settings block
Add default_space_settings.space_storage_settings block
Add default_space_settings.custom_posix_user_config block
Add default_space_settings.custom_file_system_config block

Relations

Closes #38240
Closes #38150

References

StudioWebPortalSettings API
DefaultSpaceSettings API

Output from Acceptance Testing

$ make testacc TESTS=TestAccSageMaker_serial/Domain/studioWebPortalSettings_hiddenAppTypes PKG=sagemaker
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMaker_serial/Domain/studioWebPortalSettings_hiddenAppTypes'  -timeout 360m
=== RUN   TestAccSageMaker_serial
=== PAUSE TestAccSageMaker_serial
=== CONT  TestAccSageMaker_serial
=== RUN   TestAccSageMaker_serial/Domain
=== RUN   TestAccSageMaker_serial/Domain/studioWebPortalSettings_hiddenAppTypes
--- PASS: TestAccSageMaker_serial (387.69s)
    --- PASS: TestAccSageMaker_serial/Domain (387.69s)
        --- PASS: TestAccSageMaker_serial/Domain/studioWebPortalSettings_hiddenAppTypes (387.68s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  413.998s

$ make testacc TESTS=TestAccSageMaker_serial/Domain/studioWebPortalSettings_hiddenMlTools PKG=sagemaker
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMaker_serial/Domain/studioWebPortalSettings_hiddenMlTools'  -timeout 360m
=== RUN   TestAccSageMaker_serial
=== PAUSE TestAccSageMaker_serial
=== CONT  TestAccSageMaker_serial
=== RUN   TestAccSageMaker_serial/Domain
=== RUN   TestAccSageMaker_serial/Domain/studioWebPortalSettings_hiddenMlTools
--- PASS: TestAccSageMaker_serial (390.62s)
    --- PASS: TestAccSageMaker_serial/Domain (390.62s)
        --- PASS: TestAccSageMaker_serial/Domain/studioWebPortalSettings_hiddenMlTools (390.61s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  425.121s

$ make testacc TESTS=TestAccSageMaker_serial/Domain/spaceSettingsJupyterLabAppSettings PKG=sagemaker
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMaker_serial/Domain/spaceSettingsJupyterLabAppSettings'  -timeout 360m
=== RUN   TestAccSageMaker_serial
=== PAUSE TestAccSageMaker_serial
=== CONT  TestAccSageMaker_serial
=== RUN   TestAccSageMaker_serial/Domain
=== RUN   TestAccSageMaker_serial/Domain/spaceSettingsJupyterLabAppSettings
--- PASS: TestAccSageMaker_serial (394.52s)
    --- PASS: TestAccSageMaker_serial/Domain (394.52s)
        --- PASS: TestAccSageMaker_serial/Domain/spaceSettingsJupyterLabAppSettings (394.52s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  428.117s

$ make testacc TESTS=TestAccSageMaker_serial/Domain/spaceSettingsSpaceStorageSettings PKG=sagemaker
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMaker_serial/Domain/spaceSettingsSpaceStorageSettings'  -timeout 360m
=== RUN   TestAccSageMaker_serial
=== PAUSE TestAccSageMaker_serial
=== CONT  TestAccSageMaker_serial
=== RUN   TestAccSageMaker_serial/Domain
=== RUN   TestAccSageMaker_serial/Domain/spaceSettingsSpaceStorageSettings
--- PASS: TestAccSageMaker_serial (394.16s)
    --- PASS: TestAccSageMaker_serial/Domain (394.16s)
        --- PASS: TestAccSageMaker_serial/Domain/spaceSettingsSpaceStorageSettings (394.15s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  425.158s

$ make testacc TESTS=TestAccSageMaker_serial/Domain/spaceSettingsCustomPosixUserConfig PKG=sagemaker
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMaker_serial/Domain/spaceSettingsCustomPosixUserConfig'  -timeout 360m
=== RUN   TestAccSageMaker_serial
=== PAUSE TestAccSageMaker_serial
=== CONT  TestAccSageMaker_serial
=== RUN   TestAccSageMaker_serial/Domain
=== RUN   TestAccSageMaker_serial/Domain/spaceSettingsCustomPosixUserConfig
--- PASS: TestAccSageMaker_serial (391.35s)
    --- PASS: TestAccSageMaker_serial/Domain (391.35s)
        --- PASS: TestAccSageMaker_serial/Domain/spaceSettingsCustomPosixUserConfig (391.35s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  422.740s

$ make testacc TESTS=TestAccSageMaker_serial/Domain/spaceSettingsCustomFileSystemConfigs PKG=sagemaker
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMaker_serial/Domain/spaceSettingsCustomFileSystemConfigs'  -timeout 360m
=== RUN   TestAccSageMaker_serial
=== PAUSE TestAccSageMaker_serial
=== CONT  TestAccSageMaker_serial
=== RUN   TestAccSageMaker_serial/Domain
=== RUN   TestAccSageMaker_serial/Domain/spaceSettingsCustomFileSystemConfigs
--- PASS: TestAccSageMaker_serial (595.84s)
    --- PASS: TestAccSageMaker_serial/Domain (595.84s)
        --- PASS: TestAccSageMaker_serial/Domain/spaceSettingsCustomFileSystemConfigs (595.83s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  625.961s
...

@deepakbshetty deepakbshetty requested a review from a team as a code owner July 21, 2024 19:54
Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

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.

@terraform-aws-provider terraform-aws-provider bot added documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/sagemaker Issues and PRs that pertain to the sagemaker service. size/XL Managed by automation to categorize the size of a PR. labels Jul 21, 2024
@deepakbshetty deepakbshetty force-pushed the f-aws_sagemaker_domain-studio_web_portal_settings-default_space_settings branch from 7be0971 to e5b6672 Compare July 21, 2024 19:56
Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

@deepakbshetty
Copy link
Contributor Author

Dear @DrFaust92 , For your kind review.

@deepakbshetty deepakbshetty force-pushed the f-aws_sagemaker_domain-studio_web_portal_settings-default_space_settings branch from ea51b09 to 21a7d76 Compare July 23, 2024 21:10
@deepakbshetty
Copy link
Contributor Author

Hi @jar-b, test issues are fixed now. Appreciate if you cam retrigger

@deepakbshetty deepakbshetty force-pushed the f-aws_sagemaker_domain-studio_web_portal_settings-default_space_settings branch from 21a7d76 to 8005223 Compare July 23, 2024 22:43
@deepakbshetty
Copy link
Contributor Author

deepakbshetty commented Jul 29, 2024

Dear @DrFaust92, if you can review and approve this one for domain please.

@jmeisele
Copy link
Contributor

Hello @deepakbshetty is there anyone on the AWS Provider team that can review & approve this PR?

@deepakbshetty
Copy link
Contributor Author

Hello @deepakbshetty is there anyone on the AWS Provider team that can review & approve this PR?

I would rely DrFaust92 in first place given maintainer for sagemaker and ultimately ewbankkit

@DrFaust92
Copy link
Collaborator

LGTM, i would add the same params for user_profile resource as well as it shared some of the expand functions. can be done in a different PR

@deepakbshetty
Copy link
Contributor Author

deepakbshetty commented Aug 12, 2024

LGTM, i would add the same params for user_profile resource as well as it shared some of the expand functions. can be done in a different PR

Dear @DrFaust92, Thanks for the review. PR for User profile under #38567

@deepakbshetty deepakbshetty force-pushed the f-aws_sagemaker_domain-studio_web_portal_settings-default_space_settings branch 2 times, most recently from 1b63474 to 9297a9f Compare August 31, 2024 10:10
@deepakbshetty deepakbshetty force-pushed the f-aws_sagemaker_domain-studio_web_portal_settings-default_space_settings branch from 9297a9f to 1ffe176 Compare August 31, 2024 10:25
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 🚀.

% ACCTEST_TIMEOUT=720m make testacc TESTARGS='-run=TestAccSageMaker_serial/Domain' PKG=sagemaker
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.0 test ./internal/service/sagemaker/... -v -count 1 -parallel 20  -run=TestAccSageMaker_serial/Domain -timeout 720m
=== RUN   TestAccSageMaker_serial
=== PAUSE TestAccSageMaker_serial
=== CONT  TestAccSageMaker_serial
=== RUN   TestAccSageMaker_serial/Domain
=== RUN   TestAccSageMaker_serial/Domain/directDeploySettings
=== RUN   TestAccSageMaker_serial/Domain/spaceSettingsSpaceStorageSettings
=== RUN   TestAccSageMaker_serial/Domain/spaceSettingsCustomFileSystemConfigs
=== RUN   TestAccSageMaker_serial/Domain/studioWebPortalSettings_hiddenAppTypes
=== RUN   TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_customImage
    domain_test.go:868: Environment variable SAGEMAKER_IMAGE_VERSION_BASE_IMAGE is not set
=== RUN   TestAccSageMaker_serial/Domain/generativeAi
=== RUN   TestAccSageMaker_serial/Domain/kendraSettings
=== RUN   TestAccSageMaker_serial/Domain/efs
=== RUN   TestAccSageMaker_serial/Domain/jupyterLabAppSettings
=== RUN   TestAccSageMaker_serial/Domain/canvas
=== RUN   TestAccSageMaker_serial/Domain/codeEditorAppSettings_defaultResourceSpecAndCustomImage
    domain_test.go:762: Environment variable SAGEMAKER_IMAGE_VERSION_BASE_IMAGE is not set
=== RUN   TestAccSageMaker_serial/Domain/kms
=== RUN   TestAccSageMaker_serial/Domain/securityGroup
=== RUN   TestAccSageMaker_serial/Domain/rStudioServerProAppSettings
=== RUN   TestAccSageMaker_serial/Domain/spaceSettingsKernelGatewayAppSettings
=== RUN   TestAccSageMaker_serial/Domain/tensorboardAppSettings
=== RUN   TestAccSageMaker_serial/Domain/kernelGatewayAppSettings
=== RUN   TestAccSageMaker_serial/Domain/defaultUserSettingsUpdated
=== RUN   TestAccSageMaker_serial/Domain/disappears
=== RUN   TestAccSageMaker_serial/Domain/sharingSettings
=== RUN   TestAccSageMaker_serial/Domain/tags
=== RUN   TestAccSageMaker_serial/Domain/code
=== RUN   TestAccSageMaker_serial/Domain/domainSettings
=== RUN   TestAccSageMaker_serial/Domain/rStudioServerProDomainSettings
    acctest.go:1727: skipping test for aws/us-west-2: Error running apply: exit status 1
        
        Error: creating SageMaker Domain (d-phv6lvn91ohh): waiting for completion: unexpected state 'Failed', wanted target 'InService'. last error: ConfigurationError: Domain-level App [arn:aws:sagemaker:us-west-2:123456789012:app/d-phv6lvn91ohh/domain-shared/RStudioServerPro/default] failed to start: [ResourceNotFoundError: No available licenses were found. Validate that a license for RStudio Workbench exists in AWS License Manager that is in Active state.].
        
          with aws_sagemaker_domain.test,
          on terraform_plugin_test.tf line 86, in resource "aws_sagemaker_domain" "test":
          86: resource "aws_sagemaker_domain" "test" {
        
=== RUN   TestAccSageMaker_serial/Domain/spaceSettingsCustomPOSIXUserConfig
=== RUN   TestAccSageMaker_serial/Domain/spaceStorageSettings
=== RUN   TestAccSageMaker_serial/Domain/codeEditorAppSettings
=== RUN   TestAccSageMaker_serial/Domain/modelRegisterSettings
=== RUN   TestAccSageMaker_serial/Domain/jupyterServerAppSettings
=== RUN   TestAccSageMaker_serial/Domain/identityProviderOauthSettings
=== RUN   TestAccSageMaker_serial/Domain/workspaceSettings
=== RUN   TestAccSageMaker_serial/Domain/spaceSettingsJupyterLabAppSettings
=== RUN   TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_lifecycleConfig
=== RUN   TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_defaultResourceAndCustomImage
    domain_test.go:907: Environment variable SAGEMAKER_IMAGE_VERSION_BASE_IMAGE is not set
=== RUN   TestAccSageMaker_serial/Domain/codeEditorAppSettings_customImage
    domain_test.go:723: Environment variable SAGEMAKER_IMAGE_VERSION_BASE_IMAGE is not set
=== RUN   TestAccSageMaker_serial/Domain/rSessionAppSettings
=== RUN   TestAccSageMaker_serial/Domain/posix
=== RUN   TestAccSageMaker_serial/Domain/studioWebPortalSettings_hiddenMlTools
=== RUN   TestAccSageMaker_serial/Domain/basic
=== RUN   TestAccSageMaker_serial/Domain/tensorboardAppSettingsWithImage
--- PASS: TestAccSageMaker_serial (9939.48s)
    --- PASS: TestAccSageMaker_serial/Domain (9939.48s)
        --- PASS: TestAccSageMaker_serial/Domain/directDeploySettings (331.80s)
        --- PASS: TestAccSageMaker_serial/Domain/spaceSettingsSpaceStorageSettings (262.68s)
        --- PASS: TestAccSageMaker_serial/Domain/spaceSettingsCustomFileSystemConfigs (467.70s)
        --- PASS: TestAccSageMaker_serial/Domain/studioWebPortalSettings_hiddenAppTypes (261.72s)
        --- SKIP: TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_customImage (0.00s)
        --- PASS: TestAccSageMaker_serial/Domain/generativeAi (239.32s)
        --- PASS: TestAccSageMaker_serial/Domain/kendraSettings (249.19s)
        --- PASS: TestAccSageMaker_serial/Domain/efs (349.28s)
        --- PASS: TestAccSageMaker_serial/Domain/jupyterLabAppSettings (240.68s)
        --- PASS: TestAccSageMaker_serial/Domain/canvas (250.51s)
        --- SKIP: TestAccSageMaker_serial/Domain/codeEditorAppSettings_defaultResourceSpecAndCustomImage (0.00s)
        --- PASS: TestAccSageMaker_serial/Domain/kms (239.27s)
        --- PASS: TestAccSageMaker_serial/Domain/securityGroup (265.68s)
        --- PASS: TestAccSageMaker_serial/Domain/rStudioServerProAppSettings (277.65s)
        --- PASS: TestAccSageMaker_serial/Domain/spaceSettingsKernelGatewayAppSettings (261.79s)
        --- PASS: TestAccSageMaker_serial/Domain/tensorboardAppSettings (249.73s)
        --- PASS: TestAccSageMaker_serial/Domain/kernelGatewayAppSettings (250.12s)
        --- PASS: TestAccSageMaker_serial/Domain/defaultUserSettingsUpdated (258.10s)
        --- PASS: TestAccSageMaker_serial/Domain/disappears (271.86s)
        --- PASS: TestAccSageMaker_serial/Domain/sharingSettings (249.68s)
        --- PASS: TestAccSageMaker_serial/Domain/tags (247.48s)
        --- PASS: TestAccSageMaker_serial/Domain/code (251.49s)
        --- PASS: TestAccSageMaker_serial/Domain/domainSettings (251.44s)
        --- SKIP: TestAccSageMaker_serial/Domain/rStudioServerProDomainSettings (654.60s)
        --- PASS: TestAccSageMaker_serial/Domain/spaceSettingsCustomPOSIXUserConfig (254.57s)
        --- PASS: TestAccSageMaker_serial/Domain/spaceStorageSettings (251.89s)
        --- PASS: TestAccSageMaker_serial/Domain/codeEditorAppSettings (250.20s)
        --- PASS: TestAccSageMaker_serial/Domain/modelRegisterSettings (249.57s)
        --- PASS: TestAccSageMaker_serial/Domain/jupyterServerAppSettings (239.78s)
        --- PASS: TestAccSageMaker_serial/Domain/identityProviderOauthSettings (250.87s)
        --- PASS: TestAccSageMaker_serial/Domain/workspaceSettings (240.54s)
        --- PASS: TestAccSageMaker_serial/Domain/spaceSettingsJupyterLabAppSettings (251.21s)
        --- PASS: TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_lifecycleConfig (249.22s)
        --- SKIP: TestAccSageMaker_serial/Domain/kernelGatewayAppSettings_defaultResourceAndCustomImage (0.00s)
        --- SKIP: TestAccSageMaker_serial/Domain/codeEditorAppSettings_customImage (0.00s)
        --- PASS: TestAccSageMaker_serial/Domain/rSessionAppSettings (250.09s)
        --- PASS: TestAccSageMaker_serial/Domain/posix (249.54s)
        --- PASS: TestAccSageMaker_serial/Domain/studioWebPortalSettings_hiddenMlTools (262.66s)
        --- PASS: TestAccSageMaker_serial/Domain/basic (249.30s)
        --- PASS: TestAccSageMaker_serial/Domain/tensorboardAppSettingsWithImage (308.28s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker	9944.342s

@ewbankkit
Copy link
Contributor

@deepakbshetty Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 8121ff3 into hashicorp:main Sep 9, 2024
40 checks passed
@github-actions github-actions bot added this to the v5.67.0 milestone Sep 9, 2024
Copy link

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

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 Oct 13, 2024
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. service/sagemaker Issues and PRs that pertain to the sagemaker service. size/XL 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
4 participants