Skip to content

New resource : aws_sagemaker_training_job#46892

Open
taruntej-a wants to merge 58 commits intomainfrom
f-aws_sagemaker_training_job
Open

New resource : aws_sagemaker_training_job#46892
taruntej-a wants to merge 58 commits intomainfrom
f-aws_sagemaker_training_job

Conversation

@taruntej-a
Copy link
Contributor

@taruntej-a taruntej-a commented Mar 12, 2026

Rollback Plan

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

Description

This PR will :

  1. Add new resource aws_sagemaker_training_job
  2. Implements resource identity
  3. Implements List for aws_sagemaker_training_job

Relations

Closes #46049

References

CREATE - https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html

READ - https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeTrainingJob.html

UPDATE - https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateTrainingJob.html

DELETE - https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteTrainingJob.html

LIST - https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListTrainingJobs.html

Output from Acceptance Testing

make testacc PKG=sagemaker TESTS=TestAccSageMakerTrainingJob_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_sagemaker_training_job 🌿...
TF_ACC=1 go1.25.8 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerTrainingJob_'  -timeout 360m -vet=off
2026/03/13 23:40:58 Creating Terraform AWS Provider (SDKv2-style)...
2026/03/13 23:40:58 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccSageMakerTrainingJob_Identity_basic
=== PAUSE TestAccSageMakerTrainingJob_Identity_basic
=== RUN   TestAccSageMakerTrainingJob_Identity_regionOverride
=== PAUSE TestAccSageMakerTrainingJob_Identity_regionOverride
=== RUN   TestAccSageMakerTrainingJob_List_basic
=== PAUSE TestAccSageMakerTrainingJob_List_basic
=== RUN   TestAccSageMakerTrainingJob_List_includeResource
=== PAUSE TestAccSageMakerTrainingJob_List_includeResource
=== RUN   TestAccSageMakerTrainingJob_List_regionOverride
=== PAUSE TestAccSageMakerTrainingJob_List_regionOverride
=== RUN   TestAccSageMakerTrainingJob_basic
--- PASS: TestAccSageMakerTrainingJob_basic (242.58s)
=== RUN   TestAccSageMakerTrainingJob_disappears
--- PASS: TestAccSageMakerTrainingJob_disappears (237.56s)
=== RUN   TestAccSageMakerTrainingJob_vpc
=== RUN   TestAccSageMakerTrainingJob_vpc
--- PASS: TestAccSageMakerTrainingJob_vpc (521.95s)
=== RUN   TestAccSageMakerTrainingJob_debugConfig
--- PASS: TestAccSageMakerTrainingJob_debugConfig (482.20s)
=== RUN   TestAccSageMakerTrainingJob_profilerConfig
--- PASS: TestAccSageMakerTrainingJob_profilerConfig (505.95s)
=== RUN   TestAccSageMakerTrainingJob_environmentAndHyperParameters
--- PASS: TestAccSageMakerTrainingJob_environmentAndHyperParameters (490.31s)
=== RUN   TestAccSageMakerTrainingJob_checkpointConfig
--- PASS: TestAccSageMakerTrainingJob_checkpointConfig (467.97s)
=== RUN   TestAccSageMakerTrainingJob_tensorBoardOutputConfig
--- PASS: TestAccSageMakerTrainingJob_tensorBoardOutputConfig (469.61s)
=== RUN   TestAccSageMakerTrainingJob_inputDataConfig
--- PASS: TestAccSageMakerTrainingJob_inputDataConfig (472.51s)
=== RUN   TestAccSageMakerTrainingJob_outputDataConfig
--- PASS: TestAccSageMakerTrainingJob_outputDataConfig (471.06s)
=== RUN   TestAccSageMakerTrainingJob_algorithmSpecificationMetrics
--- PASS: TestAccSageMakerTrainingJob_algorithmSpecificationMetrics (286.19s)
=== RUN   TestAccSageMakerTrainingJob_retryStrategy
--- PASS: TestAccSageMakerTrainingJob_retryStrategy (467.16s)
=== RUN   TestAccSageMakerTrainingJob_serverless
--- PASS: TestAccSageMakerTrainingJob_serverless (368.65s)
=== RUN   TestAccSageMakerTrainingJob_tags
--- PASS: TestAccSageMakerTrainingJob_tags (293.26s)
=== RUN   TestAccSageMakerTrainingJob_infraCheckConfig
--- PASS: TestAccSageMakerTrainingJob_infraCheckConfig (482.33s)
=== RUN   TestAccSageMakerTrainingJob_mlflowConfig
    training_job_test.go:830: skipping test; environment variable SAGEMAKER_TRAINING_JOB_NOVA_MODEL_ARN must be set
--- SKIP: TestAccSageMakerTrainingJob_mlflowConfig (0.00s)
=== RUN   TestAccSageMakerTrainingJob_remoteDebugConfig
--- PASS: TestAccSageMakerTrainingJob_remoteDebugConfig (243.42s)
=== RUN   TestAccSageMakerTrainingJob_sessionChainingConfig
--- PASS: TestAccSageMakerTrainingJob_sessionChainingConfig (475.01s)
=== CONT  TestAccSageMakerTrainingJob_Identity_basic
=== CONT  TestAccSageMakerTrainingJob_List_includeResource
=== CONT  TestAccSageMakerTrainingJob_List_regionOverride
=== CONT  TestAccSageMakerTrainingJob_List_basic
=== CONT  TestAccSageMakerTrainingJob_Identity_regionOverride
--- PASS: TestAccSageMakerTrainingJob_List_basic (241.15s)
--- PASS: TestAccSageMakerTrainingJob_Identity_basic (241.56s)
--- PASS: TestAccSageMakerTrainingJob_List_regionOverride (242.61s)
--- PASS: TestAccSageMakerTrainingJob_List_includeResource (243.62s)
--- PASS: TestAccSageMakerTrainingJob_Identity_regionOverride (257.85s)
PASS
ok    github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  6283.429s

TestAccSageMakerTrainingJob_mlflowConfig could not be tested as we can't push a "nova" images to ECR like we did for TestAccSageMakerTrainingJob_algorithmSpecificationMetrics (For this custom image was pushed to ECR and tested with a env var)

DELETE has extra cleanups

Delete has extra cleanup functions because :

Without ENI cleanup :

make testacc PKG=sagemaker TESTS=TestAccSageMakerTrainingJob_vpc
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_sagemaker_training_job 🌿...
TF_ACC=1 go1.25.8 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerTrainingJob_vpc'  -timeout 360m -vet=off
2026/03/14 03:02:49 Creating Terraform AWS Provider (SDKv2-style)...
2026/03/14 03:02:49 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccSageMakerTrainingJob_vpc
    training_job_test.go:121: Error running post-test destroy, there may be dangling resources: exit status 1
        
        Error: deleting EC2 Subnet (subnet-xxxxxxxxxxxx): operation error EC2: DeleteSubnet, https response error StatusCode: 400, RequestID: XXXXXXXXXXXXXXXXX, api error DependencyViolation: The subnet 'subnet-xxxxxxxxxxxx' has dependencies and cannot be deleted.
        
        
        Error: deleting Security Group (sg-xxxxxxxxxxxxxxxxx): operation error EC2: DeleteSecurityGroup, https response error StatusCode: 400, RequestID: xxxxxxxxxxxxxxxxx, api error DependencyViolation: resource sg-xxxxxxxxxxxxxxxxx has a dependent object
        
--- FAIL: TestAccSageMakerTrainingJob_vpc (1692.15s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  1697.082s
FAIL
make: *** [testacc] Error 1

Without model package cleanup :

make testacc PKG=sagemaker TESTS=TestAccSageMakerTrainingJob_serverless

make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_sagemaker_training_job 🌿...
TF_ACC=1 go1.25.8 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerTrainingJob_serverless'  -timeout 360m -vet=off
2026/03/14 04:20:19 Creating Terraform AWS Provider (SDKv2-style)...
2026/03/14 04:20:19 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccSageMakerTrainingJob_serverless
    training_job_test.go:640: Error running post-test destroy, there may be dangling resources: exit status 1
        
        Error: deleting SageMaker AI Model Package Group (tf-acc-test-XXXXXXXXXXX): operation error SageMaker: DeleteModelPackageGroup, https response error StatusCode: 400, RequestID: XXXXXXXXXX, api error ValidationException: Model Package Group arn:aws:sagemaker:us-west-2:XXXXXXXXX:model-package-group/tf-acc-test-XXXXXXXXXXXXXX cannot be deleted because it still contains Model Packages.
        
--- FAIL: TestAccSageMakerTrainingJob_serverless (351.54s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  356.497s
FAIL
make: *** [testacc] Error 1

CREATE/READ normalise functions

why normalizeStoppingCondition

AWS injects a default stopping_condition for serverless jobs when the user omitted it. Only suppress that value for serverless jobs so import can still retain explicit stopping_condition values for non-serverless jobs.

Without this we get this error for serverless jobs :

make testacc PKG=sagemaker TESTS=TestAccSageMakerTrainingJob_serverless
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_sagemaker_training_job 🌿...
TF_ACC=1 go1.25.8 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerTrainingJob_serverless'  -timeout 360m -vet=off
2026/03/16 14:43:54 Creating Terraform AWS Provider (SDKv2-style)...
2026/03/16 14:43:54 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccSageMakerTrainingJob_serverless
    training_job_test.go:640: Step 1/3 error: Error running apply: exit status 1
        
        Error: Provider produced inconsistent result after apply
        
        When applying changes to aws_sagemaker_training_job.test, provider
        "provider[\"registry.terraform.io/hashicorp/aws\"]" produced an unexpected
        new value: .stopping_condition: block count changed from 0 to 1.
        
        This is a bug in the provider, which should be reported in the provider's own
        issue tracker.
--- FAIL: TestAccSageMakerTrainingJob_serverless (260.16s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  265.472s
FAIL
make: *** [testacc] Error 1

Just adding the stopping_condition block for serverless test config , fixes this without normalise function , but we shouldn't expect this block from for serverless jobs(?).

For non serverless job , AWS makes this mandatory with error during apply :

Cause: operation error SageMaker: CreateTrainingJob, , api error ValidationException: Value null at 'stoppingCondition' failed to
│ satisfy constraint: Member must not be null"

why normalizeAlgoSpecMetricDefinitions

SageMaker injects metric definitions for some built-in algorithms and supported prebuilt images.

make testacc PKG=sagemaker TESTS=TestAccSageMakerTrainingJob_basic
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_sagemaker_training_job 🌿...
TF_ACC=1 go1.25.8 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerTrainingJob_basic'  -timeout 360m -vet=off
2026/03/16 17:28:55 Creating Terraform AWS Provider (SDKv2-style)...
2026/03/16 17:28:55 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccSageMakerTrainingJob_basic
    training_job_test.go:40: Step 1/2 error: Error running apply: exit status 1
        
        Error: Provider produced inconsistent result after apply
        
        When applying changes to aws_sagemaker_training_job.test, provider
        "provider[\"registry.terraform.io/hashicorp/aws\"]" produced an unexpected
        new value: .algorithm_specification[0].metric_definitions: block count
        changed from 0 to 39.
        
        This is a bug in the provider, which should be reported in the provider's own
        issue tracker.
--- FAIL: TestAccSageMakerTrainingJob_basic (225.92s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  230.820s
FAIL

Wait jobs won't wait for terminal states

Since the training jobs can go up to 30 days, we cannot wait for terminal states.

Tarun teja added 30 commits March 12, 2026 02:26
…on, checkpoint config, debug hook, debug rule, experiment config, infra and input config
…package config and output data config block
…pping conditions, tensor board output and vpc config block
… check point config and env hyper parameters
…ix test cases for retry strategy, algo specification, input/ouput data config
…e debug, session chaining and serverless config + schema changes
@taruntej-a taruntej-a added the rnd-ind-provider rnd-ind-provider label Mar 13, 2026
@taruntej-a taruntej-a changed the title Draft: F aws sagemaker training job New resource : aws_sagemaker_training_job Mar 13, 2026
@taruntej-a taruntej-a added new-list-resource Introduces list resource support. resource-identity Pertains to resource identity. labels Mar 13, 2026
@taruntej-a taruntej-a marked this pull request as ready for review March 16, 2026 02:46
@taruntej-a taruntej-a requested a review from a team as a code owner March 16, 2026 02:46
@dosubot dosubot bot added the new-resource Introduces a new resource. label Mar 16, 2026
Comment on lines +546 to +548
* `create` - (Default `60m`)
* `update` - (Default `180m`)
* `delete` - (Default `90m`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `create` - (Default `60m`)
* `update` - (Default `180m`)
* `delete` - (Default `90m`)
* `create` - (Default `25m`)
* `update` - (Default `25m`)
* `delete` - (Default `25m`)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Serverless jobs sometimes tends to take around 35 mins, So I have updated this to newer values consistently in resource code and in documentation.

Before timeout change :

make testacc PKG=sagemaker TESTS=TestAccSageMakerTrainingJob_serverless
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_sagemaker_training_job 🌿...
TF_ACC=1 go1.25.8 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerTrainingJob_serverless'  -timeout 360m -vet=off
2026/03/17 12:27:15 Creating Terraform AWS Provider (SDKv2-style)...
2026/03/17 12:27:15 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccSageMakerTrainingJob_serverless
    training_job_test.go:640: Error running post-test destroy, there may be dangling resources: exit status 1
        
        Error: deleting SageMaker AI Training Job
        
        ID: tf-acc-test-XXXXXXXXXXXXXXXX
        Cause: While waiting, timeout while waiting for state to become 'Completed,
        Failed, Stopped' (timeout: 35m0s): operation error SageMaker:
        DescribeTrainingJob, context deadline exceeded"
        
--- FAIL: TestAccSageMakerTrainingJob_serverless (2182.86s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  2188.032s
FAIL
make: *** [testacc] Error 1

After new timeout (took around 36 mins) :

make testacc PKG=sagemaker TESTS=TestAccSageMakerTrainingJob_serverless
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_sagemaker_training_job 🌿...
TF_ACC=1 go1.25.8 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerTrainingJob_serverless'  -timeout 360m -vet=off
2026/03/17 13:05:53 Creating Terraform AWS Provider (SDKv2-style)...
2026/03/17 13:05:53 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccSageMakerTrainingJob_serverless
--- PASS: TestAccSageMakerTrainingJob_serverless (2192.87s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  2198.048s

So making this 45 to handle any region differences.

Target: enum.Slice(awstypes.TrainingJobStatusCompleted, awstypes.TrainingJobStatusStopped, awstypes.TrainingJobStatusFailed),
Refresh: statusTrainingJob(conn, id),
Timeout: timeout,
NotFoundChecks: 20,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the built-in default when no value is set, so can be omitted.

Suggested change
NotFoundChecks: 20,

S3OutputPath types.String `tfsdk:"s3_output_path"`
}

func sweepTrainingJobs(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepable, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can move into sweep.go for consistency with the other sweeper functions.

return out, nil
}

type resourceTrainingJobModel struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit - alphabetize attributes.

This resource exports the following attributes in addition to the arguments above:

* `arn` - ARN of the Training Job.
* `id` - Name of the Training Job.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No id attribute in the schema.

Suggested change
* `id` - Name of the Training Job.

out, err := tfresource.RetryWhen(ctx, propagationTimeout, func(ctx context.Context) (*sagemaker.CreateTrainingJobOutput, error) {
return conn.CreateTrainingJob(ctx, &input)
}, func(err error) (bool, error) {
if tfawserr.ErrMessageContains(err, ErrCodeValidationException, "Could not assume role") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variety of messages tied to a single code here really emphasizes the difficultly of error handling when one error type is overloaded.

It might be worth adding a new helper ErrMessageContainsAny which accepts a code + slice of message strings and returns true if any match. If nothing else it will improve readability here.

}
}

func setZeroAttrValuesToNull(ctx context.Context, target any) diag.Diagnostics {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for nulling zero values here? Is this something that should be accounted for more centrally for all Framework-based resources?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The zero values are being nulled because the list API is reusing the full TrainingJobModel, which has custom Terraform Framework collection types. In the list flow, the model starts off as a zero‑value struct, and flex.Flatten() only fills in the fields that actually come back from AWS. Any optional lists or maps that AWS doesn’t return are left as Go zero values instead of proper Terraform nulls.

when SetResult() tries to serialize the model , the framework calls ToTerraformValue() on these zero‑value collection wrappers, and that’s where the nil pointer panic happens. By explicitly nulling these fields, we make sure they are treated as Terraform null values, not invalid zero‑value framework types, and the panic is avoided.

Error I was getting without this function :

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x30 pc=0x101333ea4]

goroutine 8635 [running]:
github.com/hashicorp/terraform-plugin-framework/types/basetypes.ListValue.ToTerraformValue({{0x0, 0x0, 0x0}, {0x0, 0x0}, 0x0}, {0x11e0bd0f0, 0x140034cb2f0})

}
}

func testAccPreCheck(ctx context.Context, t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be renamed testAccPreCheckTrainingJobs to avoid implying it is a service-level pre-check that should be used in tests for other SageMaker resources.


// SageMaker injects metric definitions for some built-in algorithms and supported
// prebuilt images. This fixes unexpected new value errors during apply
func normalizeAlgoSpecMetricDefinitions(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be a plan modifier rather than a function called within each CRUD handler?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be misunderstanding plan modifiers, but I do not think these are a good fit for one because the values being handled are injected by the API after create/read(during apply), so that information does not seem to be available at plan time(?).

Based on that, I moved the shared post-flatten normalization into flatten() and reused it from Createand Read mainly to avoid repeating the same logic in multiple handlers if thats okay.

If I’m thinking about plan modifiers the wrong way, I’m happy to revisit it and take another look.


out, err := conn.DescribeTrainingJob(ctx, &input)
if err != nil {
if errs.Contains(err, "ResourceNotFound") || errs.Contains(err, "Requested resource not found") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the API return both of these variations on a "Not Found" message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was repeated in Delete method and findTrainingJobByName.
I looked into AWS Documentation and added ResourceNotFound as the error to expect.
Describe - https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeTrainingJob.html
Delete - https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteTrainingJob.html

But turns out ResourceNotFound is not something we should expect here. I have made the changes.

I will comment down entire acc test suite result after all these fixes.

@taruntej-a
Copy link
Contributor Author

test case which needs env set :

make testacc PKG=sagemaker TESTS=TestAccSageMakerTrainingJob_algorithmSpecificationMetrics
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_sagemaker_training_job 🌿...
TF_ACC=1 go1.25.8 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerTrainingJob_algorithmSpecificationMetrics'  -timeout 360m -vet=off
2026/03/17 14:27:11 Creating Terraform AWS Provider (SDKv2-style)...
2026/03/17 14:27:11 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccSageMakerTrainingJob_algorithmSpecificationMetrics
--- PASS: TestAccSageMakerTrainingJob_algorithmSpecificationMetrics (128.14s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  133.046s

@taruntej-a
Copy link
Contributor Author

taruntej-a commented Mar 17, 2026

Acc test after addressing review comments :

list acc tests :

make testacc PKG=sagemaker TESTS=TestAccSageMakerTrainingJob_List_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_sagemaker_training_job 🌿...
TF_ACC=1 go1.25.8 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerTrainingJob_List_'  -timeout 360m -vet=off
2026/03/17 15:30:31 Creating Terraform AWS Provider (SDKv2-style)...
2026/03/17 15:30:31 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccSageMakerTrainingJob_List_basic
=== PAUSE TestAccSageMakerTrainingJob_List_basic
=== RUN   TestAccSageMakerTrainingJob_List_includeResource
=== PAUSE TestAccSageMakerTrainingJob_List_includeResource
=== RUN   TestAccSageMakerTrainingJob_List_regionOverride
=== PAUSE TestAccSageMakerTrainingJob_List_regionOverride
=== CONT  TestAccSageMakerTrainingJob_List_basic
=== CONT  TestAccSageMakerTrainingJob_List_regionOverride
=== CONT  TestAccSageMakerTrainingJob_List_includeResource
--- PASS: TestAccSageMakerTrainingJob_List_includeResource (92.36s)
--- PASS: TestAccSageMakerTrainingJob_List_basic (99.93s)
--- PASS: TestAccSageMakerTrainingJob_List_regionOverride (112.83s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  118.009s

identity acc tests :

make testacc PKG=sagemaker TESTS=TestAccSageMakerTrainingJob_Identity_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_sagemaker_training_job 🌿...
TF_ACC=1 go1.25.8 test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerTrainingJob_Identity_'  -timeout 360m -vet=off
2026/03/17 15:57:57 Creating Terraform AWS Provider (SDKv2-style)...
2026/03/17 15:57:57 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccSageMakerTrainingJob_Identity_basic
=== PAUSE TestAccSageMakerTrainingJob_Identity_basic
=== RUN   TestAccSageMakerTrainingJob_Identity_regionOverride
=== PAUSE TestAccSageMakerTrainingJob_Identity_regionOverride
=== CONT  TestAccSageMakerTrainingJob_Identity_basic
=== CONT  TestAccSageMakerTrainingJob_Identity_regionOverride
--- PASS: TestAccSageMakerTrainingJob_Identity_regionOverride (61.12s)
--- PASS: TestAccSageMakerTrainingJob_Identity_basic (66.85s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker  72.112s

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. generators Relates to code generators. new-list-resource Introduces list resource support. new-resource Introduces a new resource. resource-identity Pertains to resource identity. rnd-ind-provider rnd-ind-provider 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.

r/aws_sagemaker_training_job: New resource

2 participants