Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/44570.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/aws_sagemaker_notebook_instance: Add `notebook-al2023-v1` to valid `platform_identifier` values
```
2 changes: 1 addition & 1 deletion internal/service/sagemaker/notebook_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func resourceNotebookInstance() *schema.Resource {
Optional: true,
Computed: true,
ForceNew: true,
ValidateFunc: validation.StringMatch(regexache.MustCompile(`^(notebook-al1-v1|notebook-al2-v1|notebook-al2-v2|notebook-al2-v3)$`), ""),
ValidateFunc: validation.StringMatch(regexache.MustCompile(`^(notebook-al1-v1|notebook-al2-v1|notebook-al2-v2|notebook-al2-v3|notebook-al2023-v1)$`), ""),
},
names.AttrRoleARN: {
Type: schema.TypeString,
Expand Down
17 changes: 5 additions & 12 deletions internal/service/sagemaker/notebook_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestAccSageMakerNotebookInstance_basic(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "instance_metadata_service_configuration.0.minimum_instance_metadata_service_version", "2"),
resource.TestCheckResourceAttr(resourceName, names.AttrInstanceType, "ml.t2.medium"),
resource.TestCheckResourceAttr(resourceName, names.AttrName, rName),
resource.TestCheckResourceAttr(resourceName, "platform_identifier", "notebook-al2-v2"),
resource.TestCheckResourceAttr(resourceName, "platform_identifier", "notebook-al2-v3"),
resource.TestCheckResourceAttrPair(resourceName, names.AttrRoleARN, "aws_iam_role.test", names.AttrARN),
resource.TestCheckResourceAttr(resourceName, "root_access", "Enabled"),
resource.TestCheckResourceAttr(resourceName, "security_groups.#", "0"),
Expand Down Expand Up @@ -409,10 +409,10 @@ func TestAccSageMakerNotebookInstance_Platform_identifier(t *testing.T) {
CheckDestroy: testAccCheckNotebookInstanceDestroy(ctx),
Steps: []resource.TestStep{
{
Config: testAccNotebookInstanceConfig_platformIdentifier(rName, "notebook-al2-v1"),
Config: testAccNotebookInstanceConfig_platformIdentifier(rName, "notebook-al2-v3"),
Check: resource.ComposeTestCheckFunc(
testAccCheckNotebookInstanceExists(ctx, resourceName, &notebook),
resource.TestCheckResourceAttr(resourceName, "platform_identifier", "notebook-al2-v1"),
resource.TestCheckResourceAttr(resourceName, "platform_identifier", "notebook-al2-v3"),
),
},
{
Expand All @@ -421,17 +421,10 @@ func TestAccSageMakerNotebookInstance_Platform_identifier(t *testing.T) {
ImportStateVerify: true,
},
{
Config: testAccNotebookInstanceConfig_platformIdentifier(rName, "notebook-al2-v2"),
Check: resource.ComposeTestCheckFunc(
testAccCheckNotebookInstanceExists(ctx, resourceName, &notebook),
resource.TestCheckResourceAttr(resourceName, "platform_identifier", "notebook-al2-v2"),
),
},
{
Config: testAccNotebookInstanceConfig_platformIdentifier(rName, "notebook-al2-v3"),
Config: testAccNotebookInstanceConfig_platformIdentifier(rName, "notebook-al2023-v1"),
Check: resource.ComposeTestCheckFunc(
testAccCheckNotebookInstanceExists(ctx, resourceName, &notebook),
resource.TestCheckResourceAttr(resourceName, "platform_identifier", "notebook-al2-v3"),
resource.TestCheckResourceAttr(resourceName, "platform_identifier", "notebook-al2023-v1"),
),
},
},
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/sagemaker_notebook_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ This resource supports the following arguments:
* `name` - (Required) The name of the notebook instance (must be unique).
* `role_arn` - (Required) The ARN of the IAM role to be used by the notebook instance which allows SageMaker AI to call other services on your behalf.
* `instance_type` - (Required) The name of ML compute instance type.
* `platform_identifier` - (Optional) The platform identifier of the notebook instance runtime environment. This value can be either `notebook-al1-v1`, `notebook-al2-v1`, `notebook-al2-v2`, or `notebook-al2-v3`, depending on which version of Amazon Linux you require.
* `platform_identifier` - (Optional) The platform identifier of the notebook instance runtime environment. This value can be either `notebook-al1-v1`(deprecated), `notebook-al2-v1`(deprecated), `notebook-al2-v2`(deprecated), `notebook-al2-v3`, or `notebook-al2023-v1`, depending on which version of Amazon Linux you require. Defaults to `notebook-al2-v3`.
* `volume_size` - (Optional) The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB.
* `subnet_id` - (Optional) The VPC subnet ID.
* `security_groups` - (Optional) The associated security groups.
Expand Down
Loading