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

aws_sagemaker_endpoint_configuration - add name_prefix argument #28785

Merged

Conversation

Limess
Copy link
Contributor

@Limess Limess commented Jan 10, 2023

Description

Adds name_prefix argument to sagemaker: aws_sagemaker_endpoint_configuration.

This allows a human readable name to be used when updating aws_sagemaker_endpoint_configuration.

Prior to this change, it was not possible to use a simple name as the attributes for a given aws_sagemaker_endpoint_configuration seem to be immutable, so two could not co-exist with the same name and differing configurations.

Relations

Fixes #21811

References

Used the same approach as batch/compute_environment.go as this has similar problems with immutable resources and uses a name prefix to mitigate them.

Output from Acceptance Testing

$ make testacc TESTS=TestAccSageMakerEndpointConfiguration PKG=sagemaker

make testacc TESTS=TestAccSageMakerEndpointConfiguration PKG=sage
maker
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerEndpointConfiguration'  -timeout 180m
=== RUN   TestAccSageMakerEndpointConfiguration_basic
=== PAUSE TestAccSageMakerEndpointConfiguration_basic
=== RUN   TestAccSageMakerEndpointConfiguration_nameGenerated
=== PAUSE TestAccSageMakerEndpointConfiguration_nameGenerated
=== RUN   TestAccSageMakerEndpointConfiguration_namePrefix
=== PAUSE TestAccSageMakerEndpointConfiguration_namePrefix
=== RUN   TestAccSageMakerEndpointConfiguration_shadowProductionVariants
=== PAUSE TestAccSageMakerEndpointConfiguration_shadowProductionVariants
=== RUN   TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless
=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless
=== RUN   TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight
=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight
=== RUN   TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType
=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType
=== RUN   TestAccSageMakerEndpointConfiguration_kmsKeyID
=== PAUSE TestAccSageMakerEndpointConfiguration_kmsKeyID
=== RUN   TestAccSageMakerEndpointConfiguration_tags
=== PAUSE TestAccSageMakerEndpointConfiguration_tags
=== RUN   TestAccSageMakerEndpointConfiguration_dataCapture
=== PAUSE TestAccSageMakerEndpointConfiguration_dataCapture
=== RUN   TestAccSageMakerEndpointConfiguration_disappears
=== PAUSE TestAccSageMakerEndpointConfiguration_disappears
=== RUN   TestAccSageMakerEndpointConfiguration_async
=== PAUSE TestAccSageMakerEndpointConfiguration_async
=== RUN   TestAccSageMakerEndpointConfiguration_async_kms
=== PAUSE TestAccSageMakerEndpointConfiguration_async_kms
=== RUN   TestAccSageMakerEndpointConfiguration_Async_notif
=== PAUSE TestAccSageMakerEndpointConfiguration_Async_notif
=== RUN   TestAccSageMakerEndpointConfiguration_Async_client
=== PAUSE TestAccSageMakerEndpointConfiguration_Async_client
=== CONT  TestAccSageMakerEndpointConfiguration_basic
=== CONT  TestAccSageMakerEndpointConfiguration_tags
=== CONT  TestAccSageMakerEndpointConfiguration_async_kms
=== CONT  TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless
=== CONT  TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType
=== CONT  TestAccSageMakerEndpointConfiguration_async
=== CONT  TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight
=== CONT  TestAccSageMakerEndpointConfiguration_disappears
=== CONT  TestAccSageMakerEndpointConfiguration_namePrefix
=== CONT  TestAccSageMakerEndpointConfiguration_dataCapture
=== CONT  TestAccSageMakerEndpointConfiguration_shadowProductionVariants
=== CONT  TestAccSageMakerEndpointConfiguration_Async_notif
=== CONT  TestAccSageMakerEndpointConfiguration_Async_client
=== CONT  TestAccSageMakerEndpointConfiguration_nameGenerated
=== CONT  TestAccSageMakerEndpointConfiguration_kmsKeyID
--- PASS: TestAccSageMakerEndpointConfiguration_async_kms (47.41s)
--- PASS: TestAccSageMakerEndpointConfiguration_Async_notif (53.42s)
--- PASS: TestAccSageMakerEndpointConfiguration_async (53.91s)
--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless (54.90s)
--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType (56.74s)
--- PASS: TestAccSageMakerEndpointConfiguration_namePrefix (56.79s)
--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight (60.05s)
--- PASS: TestAccSageMakerEndpointConfiguration_basic (60.47s)
--- PASS: TestAccSageMakerEndpointConfiguration_dataCapture (61.20s)
--- PASS: TestAccSageMakerEndpointConfiguration_kmsKeyID (64.51s)
--- PASS: TestAccSageMakerEndpointConfiguration_disappears (65.33s)
--- PASS: TestAccSageMakerEndpointConfiguration_shadowProductionVariants (65.91s)
--- PASS: TestAccSageMakerEndpointConfiguration_nameGenerated (68.55s)
--- PASS: TestAccSageMakerEndpointConfiguration_Async_client (69.46s)
--- PASS: TestAccSageMakerEndpointConfiguration_tags (105.72s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  105.790s

@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 needs-triage Waiting for first response or review from a maintainer. size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/sagemaker Issues and PRs that pertain to the sagemaker service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jan 10, 2023
This allows a human readable name to be used when updating aws_sagemaker_endpoint_configuration in-place

Fixes hashicorp#21811
@Limess Limess force-pushed the sagemaker_endpoint_configuration_name_prefix branch from e14020a to 58c13f9 Compare January 10, 2023 12:35
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 @Limess 👋

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 Jan 11, 2023
@ewbankkit ewbankkit added enhancement Requests to existing resources that expand the functionality or scope. and removed bug Addresses a defect in current functionality. labels Mar 30, 2023
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=TestAccSageMakerEndpointConfiguration_' PKG=sagemaker ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sagemaker/... -v -count 1 -parallel 3  -run=TestAccSageMakerEndpointConfiguration_ -timeout 180m
=== RUN   TestAccSageMakerEndpointConfiguration_basic
=== PAUSE TestAccSageMakerEndpointConfiguration_basic
=== RUN   TestAccSageMakerEndpointConfiguration_nameGenerated
=== PAUSE TestAccSageMakerEndpointConfiguration_nameGenerated
=== RUN   TestAccSageMakerEndpointConfiguration_namePrefix
=== PAUSE TestAccSageMakerEndpointConfiguration_namePrefix
=== RUN   TestAccSageMakerEndpointConfiguration_shadowProductionVariants
=== PAUSE TestAccSageMakerEndpointConfiguration_shadowProductionVariants
=== RUN   TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless
=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless
=== RUN   TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight
=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight
=== RUN   TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType
=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType
=== RUN   TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated
=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated
=== RUN   TestAccSageMakerEndpointConfiguration_kmsKeyID
=== PAUSE TestAccSageMakerEndpointConfiguration_kmsKeyID
=== RUN   TestAccSageMakerEndpointConfiguration_tags
=== PAUSE TestAccSageMakerEndpointConfiguration_tags
=== RUN   TestAccSageMakerEndpointConfiguration_dataCapture
=== PAUSE TestAccSageMakerEndpointConfiguration_dataCapture
=== RUN   TestAccSageMakerEndpointConfiguration_disappears
=== PAUSE TestAccSageMakerEndpointConfiguration_disappears
=== RUN   TestAccSageMakerEndpointConfiguration_async
=== PAUSE TestAccSageMakerEndpointConfiguration_async
=== RUN   TestAccSageMakerEndpointConfiguration_async_kms
=== PAUSE TestAccSageMakerEndpointConfiguration_async_kms
=== RUN   TestAccSageMakerEndpointConfiguration_Async_notif
=== PAUSE TestAccSageMakerEndpointConfiguration_Async_notif
=== RUN   TestAccSageMakerEndpointConfiguration_Async_client
=== PAUSE TestAccSageMakerEndpointConfiguration_Async_client
=== RUN   TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess
=== PAUSE TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess
=== CONT  TestAccSageMakerEndpointConfiguration_basic
=== CONT  TestAccSageMakerEndpointConfiguration_async_kms
=== CONT  TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight
--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight (37.91s)
=== CONT  TestAccSageMakerEndpointConfiguration_kmsKeyID
--- PASS: TestAccSageMakerEndpointConfiguration_basic (41.69s)
=== CONT  TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated
--- PASS: TestAccSageMakerEndpointConfiguration_async_kms (42.55s)
=== CONT  TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType
--- PASS: TestAccSageMakerEndpointConfiguration_kmsKeyID (36.41s)
=== CONT  TestAccSageMakerEndpointConfiguration_disappears
--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType (34.21s)
=== CONT  TestAccSageMakerEndpointConfiguration_async
--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated (37.10s)
=== CONT  TestAccSageMakerEndpointConfiguration_dataCapture
--- PASS: TestAccSageMakerEndpointConfiguration_disappears (31.02s)
=== CONT  TestAccSageMakerEndpointConfiguration_Async_client
--- PASS: TestAccSageMakerEndpointConfiguration_async (34.46s)
=== CONT  TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess
--- PASS: TestAccSageMakerEndpointConfiguration_dataCapture (34.36s)
=== CONT  TestAccSageMakerEndpointConfiguration_Async_notif
--- PASS: TestAccSageMakerEndpointConfiguration_Async_client (33.88s)
=== CONT  TestAccSageMakerEndpointConfiguration_shadowProductionVariants
--- PASS: TestAccSageMakerEndpointConfiguration_Async_notif (38.48s)
=== CONT  TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless
--- PASS: TestAccSageMakerEndpointConfiguration_shadowProductionVariants (34.34s)
=== CONT  TestAccSageMakerEndpointConfiguration_namePrefix
--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless (36.08s)
=== CONT  TestAccSageMakerEndpointConfiguration_nameGenerated
--- PASS: TestAccSageMakerEndpointConfiguration_namePrefix (34.96s)
=== CONT  TestAccSageMakerEndpointConfiguration_tags
--- PASS: TestAccSageMakerEndpointConfiguration_nameGenerated (36.02s)
--- PASS: TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess (116.52s)
--- PASS: TestAccSageMakerEndpointConfiguration_tags (65.86s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker	282.587s

@ewbankkit
Copy link
Contributor

@Limess Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit c2e6802 into hashicorp:main Mar 31, 2023
@github-actions github-actions bot added this to the v4.62.0 milestone Mar 31, 2023
@Limess Limess deleted the sagemaker_endpoint_configuration_name_prefix branch March 31, 2023 15:34
@github-actions
Copy link

github-actions bot commented Apr 7, 2023

This functionality has been released in v4.62.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

github-actions bot commented May 8, 2023

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 May 8, 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. 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.

Cannot rename a SageMaker Endpoint Configuration
3 participants