Skip to content

Conversation

tabito-hara
Copy link
Contributor

@tabito-hara tabito-hara commented Oct 7, 2025

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Description

  • Add notebook-al2023-v1 as a valid value for the platform_identifier argument of the aws_sagemaker_notebook_instance resource.
  • Update the documentation to mark certain platform_identifier values as deprecated.
  • Update deprecated platform_identifier in the acceptance test.

Relations

Closes #44556

References

https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateNotebookInstance.html#sagemaker-CreateNotebookInstance-request-PlatformIdentifier

https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-al2.html#nbi-al2-instances

Output from Acceptance Testing

One test failed but appears not to be related to this fix.
(due to resource shortage at AWS side?)

$ make testacc TESTS='TestAccSageMakerNotebookInstance' PKG=sagemaker
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_sagemaker_notebook_instance-add_notebook-al2023-v1 🌿...
TF_ACC=1 go1.24.6 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerNotebookInstance'  -timeout 360m -vet=off
2025/10/07 23:11:09 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/07 23:11:09 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccSageMakerNotebookInstanceLifecycleConfiguration_basic
=== PAUSE TestAccSageMakerNotebookInstanceLifecycleConfiguration_basic
=== RUN   TestAccSageMakerNotebookInstanceLifecycleConfiguration_update
=== PAUSE TestAccSageMakerNotebookInstanceLifecycleConfiguration_update
=== RUN   TestAccSageMakerNotebookInstanceLifecycleConfiguration_tags
=== PAUSE TestAccSageMakerNotebookInstanceLifecycleConfiguration_tags
=== RUN   TestAccSageMakerNotebookInstanceLifecycleConfiguration_disappears
=== PAUSE TestAccSageMakerNotebookInstanceLifecycleConfiguration_disappears
=== RUN   TestAccSageMakerNotebookInstance_basic
=== PAUSE TestAccSageMakerNotebookInstance_basic
=== RUN   TestAccSageMakerNotebookInstance_imds
=== PAUSE TestAccSageMakerNotebookInstance_imds
=== RUN   TestAccSageMakerNotebookInstance_update
=== PAUSE TestAccSageMakerNotebookInstance_update
=== RUN   TestAccSageMakerNotebookInstance_volumeSize
=== PAUSE TestAccSageMakerNotebookInstance_volumeSize
=== RUN   TestAccSageMakerNotebookInstance_lifecycleName
=== PAUSE TestAccSageMakerNotebookInstance_lifecycleName
=== RUN   TestAccSageMakerNotebookInstance_tags
=== PAUSE TestAccSageMakerNotebookInstance_tags
=== RUN   TestAccSageMakerNotebookInstance_kms
=== PAUSE TestAccSageMakerNotebookInstance_kms
=== RUN   TestAccSageMakerNotebookInstance_disappears
=== PAUSE TestAccSageMakerNotebookInstance_disappears
=== RUN   TestAccSageMakerNotebookInstance_Root_access
=== PAUSE TestAccSageMakerNotebookInstance_Root_access
=== RUN   TestAccSageMakerNotebookInstance_Platform_identifier
=== PAUSE TestAccSageMakerNotebookInstance_Platform_identifier
=== RUN   TestAccSageMakerNotebookInstance_DirectInternet_access
=== PAUSE TestAccSageMakerNotebookInstance_DirectInternet_access
=== RUN   TestAccSageMakerNotebookInstance_DefaultCode_repository
=== PAUSE TestAccSageMakerNotebookInstance_DefaultCode_repository
=== RUN   TestAccSageMakerNotebookInstance_AdditionalCode_repositories
=== PAUSE TestAccSageMakerNotebookInstance_AdditionalCode_repositories
=== RUN   TestAccSageMakerNotebookInstance_DefaultCodeRepository_sageMakerRepo
=== PAUSE TestAccSageMakerNotebookInstance_DefaultCodeRepository_sageMakerRepo
=== RUN   TestAccSageMakerNotebookInstance_acceleratorTypes
=== PAUSE TestAccSageMakerNotebookInstance_acceleratorTypes
=== CONT  TestAccSageMakerNotebookInstanceLifecycleConfiguration_basic
=== CONT  TestAccSageMakerNotebookInstance_DefaultCodeRepository_sageMakerRepo
=== CONT  TestAccSageMakerNotebookInstance_Platform_identifier
=== CONT  TestAccSageMakerNotebookInstance_kms
=== CONT  TestAccSageMakerNotebookInstance_DefaultCode_repository
=== CONT  TestAccSageMakerNotebookInstance_DirectInternet_access
=== CONT  TestAccSageMakerNotebookInstance_AdditionalCode_repositories
=== CONT  TestAccSageMakerNotebookInstance_Root_access
=== CONT  TestAccSageMakerNotebookInstance_acceleratorTypes
=== CONT  TestAccSageMakerNotebookInstance_disappears
=== CONT  TestAccSageMakerNotebookInstance_imds
=== CONT  TestAccSageMakerNotebookInstance_lifecycleName
=== CONT  TestAccSageMakerNotebookInstance_volumeSize
=== CONT  TestAccSageMakerNotebookInstance_update
=== CONT  TestAccSageMakerNotebookInstanceLifecycleConfiguration_disappears
=== CONT  TestAccSageMakerNotebookInstance_basic
=== CONT  TestAccSageMakerNotebookInstanceLifecycleConfiguration_tags
=== CONT  TestAccSageMakerNotebookInstanceLifecycleConfiguration_update
=== CONT  TestAccSageMakerNotebookInstance_tags
=== NAME  TestAccSageMakerNotebookInstance_DirectInternet_access
    notebook_instance_test.go:444: Step 1/3 error: Error running apply: exit status 1
        
        Error: waiting for SageMaker AI Notebook Instance (tf-acc-test-6108141892617991502) create: unexpected state 'Failed', wanted target 'InService'. last error: The Notebook Instance type 'ml.t2.medium' is not available in the availability zone 'us-west-2d'. We apologize for the inconvenience. Please try again using subnet in a different availability zone, or try a different instance type.
        
          with aws_sagemaker_notebook_instance.test,
          on terraform_plugin_test.tf line 29, in resource "aws_sagemaker_notebook_instance" "test":
          29: resource "aws_sagemaker_notebook_instance" "test" {
        
--- PASS: TestAccSageMakerNotebookInstanceLifecycleConfiguration_disappears (29.85s)
--- PASS: TestAccSageMakerNotebookInstanceLifecycleConfiguration_basic (34.01s)
--- FAIL: TestAccSageMakerNotebookInstance_DirectInternet_access (35.97s)
--- PASS: TestAccSageMakerNotebookInstanceLifecycleConfiguration_update (50.07s)
--- PASS: TestAccSageMakerNotebookInstanceLifecycleConfiguration_tags (57.20s)
--- PASS: TestAccSageMakerNotebookInstance_disappears (348.39s)
--- PASS: TestAccSageMakerNotebookInstance_kms (414.08s)
--- PASS: TestAccSageMakerNotebookInstance_basic (417.06s)
--- PASS: TestAccSageMakerNotebookInstance_tags (435.41s)
--- PASS: TestAccSageMakerNotebookInstance_update (674.99s)
--- PASS: TestAccSageMakerNotebookInstance_Root_access (697.01s)
--- PASS: TestAccSageMakerNotebookInstance_imds (699.28s)
--- PASS: TestAccSageMakerNotebookInstance_Platform_identifier (861.31s)
--- PASS: TestAccSageMakerNotebookInstance_lifecycleName (992.01s)
--- PASS: TestAccSageMakerNotebookInstance_volumeSize (1024.89s)
--- PASS: TestAccSageMakerNotebookInstance_DefaultCodeRepository_sageMakerRepo (1200.62s)
--- PASS: TestAccSageMakerNotebookInstance_DefaultCode_repository (1205.03s)
--- PASS: TestAccSageMakerNotebookInstance_acceleratorTypes (1259.20s)
--- PASS: TestAccSageMakerNotebookInstance_AdditionalCode_repositories (1562.75s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  1567.219s
FAIL
make: *** [testacc] Error 1

Copy link
Contributor

github-actions bot commented Oct 7, 2025

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • 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. 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/XS Managed by automation to categorize the size of a PR. labels Oct 7, 2025
@tabito-hara tabito-hara marked this pull request as ready for review October 7, 2025 15:19
@tabito-hara tabito-hara requested a review from a team as a code owner October 7, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. needs-triage Waiting for first response or review from a maintainer. 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.

Add notebook-al2023-v1 possible value for aws_sagemaker_notebook_instance.platform_identifier
1 participant