SageMaker pipeline correctly updates to the new pipeline definition located in a different S3 file.
pipeline_definition is not listed as a change in the diff, does not display that it will be changed to -> null
Actual Behavior
The diff includes pipeline_definition changing from the current JSON definition to null.
Apply fails, as it runs the validations for pipeline_definition (which is not being provided, as it's mutually exclusive with the pipeline_definition_s3_location attribute), indicating that its minimum length must be 1.
Relevant Error/Panic Output Snippet
# aws_sagemaker_pipeline.this will be updated in-place
~ resource "aws_sagemaker_pipeline" "this" {
id = "mypipeline"
- pipeline_definition = jsonencode(
{
# all current JSON retrieved from the previous S3 file
}
) -> null
~ pipeline_definition_s3_location {
~ object_key = "pipelines/0.0.1/mypipeline.json" -> "pipelines/0.0.2/mypipeline.json"
# (1 unchanged attribute hidden)
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
aws_sagemaker_pipeline.this: Modifying... [id=mypipeline]
╷
│ Error: updating SageMaker Pipeline (mypipeline): InvalidParameter: 1 validation error(s) found.
│ - minimum field size of 1, UpdatePipelineInput.PipelineDefinition.
│
│
│ with aws_sagemaker_pipeline.this,
│ on main.tf line 8, in resource "aws_sagemaker_pipeline" "this":
│ 8: resource "aws_sagemaker_pipeline" "this" {
│
╵
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.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.4.7
AWS Provider Version
5.57.0
Affected Resource(s)
Expected Behavior
pipeline_definition
is not listed as a change in the diff, does not display that it will be changed to-> null
Actual Behavior
pipeline_definition
changing from the current JSON definition tonull
.pipeline_definition
(which is not being provided, as it's mutually exclusive with thepipeline_definition_s3_location
attribute), indicating that its minimum length must be 1.Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
v1.json
andv2.json
)apply
usingv1.json
to create the SageMaker pipeline.aws_sagemaker_pipeline.pipeline_definition_s3_location
to point tov2.json
.Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None