Skip to content

b/sagemaker_image_version-use-version-in-id #42606

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

Conversation

psantus
Copy link
Contributor

@psantus psantus commented May 13, 2025

Description

Makes aws_sagemaker_image_version identify the Image Versions by image name AND version number, to avoid ambiguous relationship between configuration and deployed resources.

Relations

Closes #42605

References

Output from Acceptance Testing

% export TF_ACC=1
export AWS_PROFILE=<REDACTED>
export SAGEMAKER_IMAGE_VERSION_BASE_IMAGE=<REDACTED>.dkr.ecr.us-west-2.amazonaws.com/terraform-test:latest
cd ./internal/service/sagemaker
go test -v -run="TestAccSageMakerImageVersion_basic"

2025/05/14 00:49:30 Initializing Terraform AWS Provider...
=== RUN   TestAccSageMakerImageVersion_basic
=== PAUSE TestAccSageMakerImageVersion_basic
=== CONT  TestAccSageMakerImageVersion_basic
--- PASS: TestAccSageMakerImageVersion_basic (92.81s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  96.813s

% go test -v -run="TestAccSageMakerImageVersion_full"

2025/05/14 00:51:53 Initializing Terraform AWS Provider...
=== RUN   TestAccSageMakerImageVersion_full
=== PAUSE TestAccSageMakerImageVersion_full
=== CONT  TestAccSageMakerImageVersion_full
--- PASS: TestAccSageMakerImageVersion_full (107.90s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  111.822s

% go test -v -run="TestAccSageMakerImageVersion_disappears"

=== RUN   TestAccSageMakerImageVersion_disappears
=== PAUSE TestAccSageMakerImageVersion_disappears
=== CONT  TestAccSageMakerImageVersion_disappears
--- PASS: TestAccSageMakerImageVersion_disappears (88.61s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  92.487s

% go test -v -run="TestAccSageMakerImageVersion_Disappears_image"
2025/05/14 00:56:55 Initializing Terraform AWS Provider...
=== RUN   TestAccSageMakerImageVersion_Disappears_image
=== PAUSE TestAccSageMakerImageVersion_Disappears_image
=== CONT  TestAccSageMakerImageVersion_Disappears_image
--- PASS: TestAccSageMakerImageVersion_Disappears_image (89.82s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  93.766s


...
% go test -v -run="TestParseImageVersionID"

2025/05/14 00:47:02 Initializing Terraform AWS Provider...
=== RUN   TestParseImageVersionID
=== RUN   TestParseImageVersionID/valid_ID_with_name_and_version
=== RUN   TestParseImageVersionID/invalid_ID_without_version
=== RUN   TestParseImageVersionID/invalid_ID_with_invalid_version
--- PASS: TestParseImageVersionID (0.00s)
    --- PASS: TestParseImageVersionID/valid_ID_with_name_and_version (0.00s)
    --- PASS: TestParseImageVersionID/invalid_ID_without_version (0.00s)
    --- PASS: TestParseImageVersionID/invalid_ID_with_invalid_version (0.00s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  4.001s



...

@psantus psantus requested a review from a team as a code owner May 13, 2025 23:02
Copy link

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.

Copy link

github-actions bot commented May 13, 2025

✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible.

@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/L Managed by automation to categorize the size of a PR. labels May 13, 2025
@psantus psantus force-pushed the b/sagemaker_image_version-use-version-in-id branch from 346fcec to 5f6ccfc Compare May 13, 2025 23:35
@psantus
Copy link
Contributor Author

psantus commented May 14, 2025

Probable duplicate of #42536 (that was only merged on release/6.0.0-beta, not yet on main)
ping @jar-b

@jar-b jar-b removed the needs-triage Waiting for first response or review from a maintainer. label May 14, 2025
@jar-b
Copy link
Member

jar-b commented May 14, 2025

Duplicate of #42536

This fix will be available in the next V6 beta (v6.0.0-beta2) and generally available with v6.0.0 in Mid-June.

@jar-b jar-b closed this May 14, 2025
Copy link

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

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. service/sagemaker Issues and PRs that pertain to the sagemaker service. size/L 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_image_version id is based only on name, should rely on version too.
2 participants