Open mritterfigma opened 6 months ago
Voting for Prioritization
Volunteering to Work on This Issue
I checked a trace-level log and confirmed that the the UpdateDomain API request includes "ImageVersionNumber":0
.
By the way, I think it's better to omit it If the ImageVersionNumber is not specified rather than implicitly setting default value as 0 or 1 because ImageVersionNumber is an optional field in the schema. https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CustomImage.html
When ImageVersionNumber isn't specified, the latest version of the image is used. https://docs.aws.amazon.com/sagemaker/latest/dg/studio-byoi-attach.html
Terraform Core Version
1.8.3
AWS Provider Version
5.42.0
Affected Resource(s)
When specifying a
custom_image
inside asagemaker_domain
, theimage_version_number
field is optional. If you leave it out, the default is 0. Unfortunately, it is impossible to have a version number 0 in the AWS custom version system for Sagemaker Domains. This results in a successful apply but a setup that actually doesn't work (i.e. you can't start a JupyterLab Space from the image, for example).The default should be 1 instead so that the configuration will be valid.
For example, consider the following snippet taken from the terraform docs:
This configuration will not work because
aws_sagemaker_image_version.example
will have version 1, whilekernel_gateway_app_settings.custom_image
will have version 0Expected Behavior
Default should be 1, not 0
Actual Behavior
Default of 0 results in successful apply but bad config
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None