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_device - new resource #22427

Merged
merged 3 commits into from
Jan 6, 2022
Merged

Conversation

DrFaust92
Copy link
Collaborator

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Output from acceptance testing:

$ make testacc TESTS=TestAccSageMakerDevice_ PKG=sagemaker
--- PASS: TestAccSageMakerDevice_disappears_fleet (128.68s)
--- PASS: TestAccSageMakerDevice_disappears (130.71s)
--- PASS: TestAccSageMakerDevice_basic (150.00s)
--- PASS: TestAccSageMakerDevice_description (252.02s)

I have omited tags on purpose as tests keep failing on arn being too long when reading tags, with the struct of the arn its too long for the api (65 min when api checks for 63 max)

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/fsx Issues and PRs that pertain to the fsx service. service/sagemaker Issues and PRs that pertain to the sagemaker service. sweeper Pertains to changes to or issues with the sweeper. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/XL Managed by automation to categorize the size of a PR. labels Jan 5, 2022
@DrFaust92 DrFaust92 added the new-resource Introduces a new resource. label Jan 5, 2022
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 🚀.

Commercial
% make testacc TESTS=TestAccSageMakerDevice_ PKG=sagemaker
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerDevice_' -timeout 180m
=== RUN   TestAccSageMakerDevice_basic
=== PAUSE TestAccSageMakerDevice_basic
=== RUN   TestAccSageMakerDevice_description
=== PAUSE TestAccSageMakerDevice_description
=== RUN   TestAccSageMakerDevice_disappears
=== PAUSE TestAccSageMakerDevice_disappears
=== RUN   TestAccSageMakerDevice_disappears_fleet
=== PAUSE TestAccSageMakerDevice_disappears_fleet
=== CONT  TestAccSageMakerDevice_basic
=== CONT  TestAccSageMakerDevice_disappears_fleet
=== CONT  TestAccSageMakerDevice_disappears
=== CONT  TestAccSageMakerDevice_description
--- PASS: TestAccSageMakerDevice_disappears_fleet (42.47s)
--- PASS: TestAccSageMakerDevice_disappears (44.50s)
--- PASS: TestAccSageMakerDevice_basic (47.85s)
--- PASS: TestAccSageMakerDevice_description (71.16s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker	76.383s
GovCloud
% make testacc TESTS=TestAccSageMakerDevice_ PKG=sagemaker
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerDevice_' -timeout 180m
=== RUN   TestAccSageMakerDevice_basic
=== PAUSE TestAccSageMakerDevice_basic
=== RUN   TestAccSageMakerDevice_description
=== PAUSE TestAccSageMakerDevice_description
=== RUN   TestAccSageMakerDevice_disappears
=== PAUSE TestAccSageMakerDevice_disappears
=== RUN   TestAccSageMakerDevice_disappears_fleet
=== PAUSE TestAccSageMakerDevice_disappears_fleet
=== CONT  TestAccSageMakerDevice_basic
=== CONT  TestAccSageMakerDevice_disappears
=== CONT  TestAccSageMakerDevice_disappears_fleet
=== CONT  TestAccSageMakerDevice_description
=== CONT  TestAccSageMakerDevice_disappears_fleet
    acctest.go:1007: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        
        Error: Error attaching policy arn:aws-us-gov:iam::aws:policy/service-role/AmazonSageMakerEdgeDeviceFleetPolicy to IAM Role tf-acc-test-8411330880681414119: NoSuchEntity: Policy arn:aws-us-gov:iam::aws:policy/service-role/AmazonSageMakerEdgeDeviceFleetPolicy does not exist or is not attachable.
        	status code: 404, request id: 8aa58717-44b5-4cdf-a330-e2228ac37321
        
          with aws_iam_role_policy_attachment.test,
          on terraform_plugin_test.tf line 57, in resource "aws_iam_role_policy_attachment" "test":
          57: resource "aws_iam_role_policy_attachment" "test" {
        
        
        Error: error creating SageMaker Device Fleet tf-acc-test-8411330880681414119: UnknownOperationException: The requested operation is not supported in the called region.
        	status code: 400, request id: e1778c8c-727d-42c6-80d4-802bdccce8ec
        
          with aws_sagemaker_device_fleet.test,
          on terraform_plugin_test.tf line 62, in resource "aws_sagemaker_device_fleet" "test":
          62: resource "aws_sagemaker_device_fleet" "test" {
        
=== CONT  TestAccSageMakerDevice_description
    acctest.go:1007: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        
        Error: Error attaching policy arn:aws-us-gov:iam::aws:policy/service-role/AmazonSageMakerEdgeDeviceFleetPolicy to IAM Role tf-acc-test-8292411892644905799: NoSuchEntity: Policy arn:aws-us-gov:iam::aws:policy/service-role/AmazonSageMakerEdgeDeviceFleetPolicy does not exist or is not attachable.
        	status code: 404, request id: ddc08d27-7e17-4917-a2ed-83a73a9b1b92
        
          with aws_iam_role_policy_attachment.test,
          on terraform_plugin_test.tf line 57, in resource "aws_iam_role_policy_attachment" "test":
          57: resource "aws_iam_role_policy_attachment" "test" {
        
        
        Error: error creating SageMaker Device Fleet tf-acc-test-8292411892644905799: UnknownOperationException: The requested operation is not supported in the called region.
        	status code: 400, request id: b50857e2-d519-45be-a002-5d6100a1fa16
        
          with aws_sagemaker_device_fleet.test,
          on terraform_plugin_test.tf line 62, in resource "aws_sagemaker_device_fleet" "test":
          62: resource "aws_sagemaker_device_fleet" "test" {
        
=== CONT  TestAccSageMakerDevice_disappears
    acctest.go:1007: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        
        Error: Error attaching policy arn:aws-us-gov:iam::aws:policy/service-role/AmazonSageMakerEdgeDeviceFleetPolicy to IAM Role tf-acc-test-7045708105631878713: NoSuchEntity: Policy arn:aws-us-gov:iam::aws:policy/service-role/AmazonSageMakerEdgeDeviceFleetPolicy does not exist or is not attachable.
        	status code: 404, request id: 92ff9d03-76c6-4444-8b78-fadf8dd30ce0
        
          with aws_iam_role_policy_attachment.test,
          on terraform_plugin_test.tf line 57, in resource "aws_iam_role_policy_attachment" "test":
          57: resource "aws_iam_role_policy_attachment" "test" {
        
        
        Error: error creating SageMaker Device Fleet tf-acc-test-7045708105631878713: UnknownOperationException: The requested operation is not supported in the called region.
        	status code: 400, request id: 00915c88-ac99-41a3-aa98-3103878f78b5
        
          with aws_sagemaker_device_fleet.test,
          on terraform_plugin_test.tf line 62, in resource "aws_sagemaker_device_fleet" "test":
          62: resource "aws_sagemaker_device_fleet" "test" {
        
=== CONT  TestAccSageMakerDevice_basic
    acctest.go:1007: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        
        Error: Error attaching policy arn:aws-us-gov:iam::aws:policy/service-role/AmazonSageMakerEdgeDeviceFleetPolicy to IAM Role tf-acc-test-6377587248070957994: NoSuchEntity: Policy arn:aws-us-gov:iam::aws:policy/service-role/AmazonSageMakerEdgeDeviceFleetPolicy does not exist or is not attachable.
        	status code: 404, request id: 292dc9cc-5b0b-4bfc-bf7d-fd4c77587a50
        
          with aws_iam_role_policy_attachment.test,
          on terraform_plugin_test.tf line 57, in resource "aws_iam_role_policy_attachment" "test":
          57: resource "aws_iam_role_policy_attachment" "test" {
        
        
        Error: error creating SageMaker Device Fleet tf-acc-test-6377587248070957994: UnknownOperationException: The requested operation is not supported in the called region.
        	status code: 400, request id: cc67efe6-5ec8-4695-8dc5-38aac18e57d8
        
          with aws_sagemaker_device_fleet.test,
          on terraform_plugin_test.tf line 62, in resource "aws_sagemaker_device_fleet" "test":
          62: resource "aws_sagemaker_device_fleet" "test" {
        
--- SKIP: TestAccSageMakerDevice_disappears_fleet (21.96s)
--- SKIP: TestAccSageMakerDevice_disappears (22.27s)
--- SKIP: TestAccSageMakerDevice_description (22.29s)
--- SKIP: TestAccSageMakerDevice_basic (22.32s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker	34.958s

@ewbankkit
Copy link
Contributor

@DrFaust92 Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 63d5a9c into hashicorp:main Jan 6, 2022
@github-actions github-actions bot added this to the v3.71.0 milestone Jan 6, 2022
@DrFaust92 DrFaust92 deleted the sagemaker_device branch January 6, 2022 13:20
@github-actions
Copy link

github-actions bot commented Jan 6, 2022

This functionality has been released in v3.71.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 May 31, 2022
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. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/fsx Issues and PRs that pertain to the fsx service. 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
Development

Successfully merging this pull request may close these issues.

2 participants