subcategory | layout | page_title | description |
---|---|---|---|
SageMaker |
aws |
AWS: aws_sagemaker_notebook_instance_lifecycle_configuration |
Provides a lifecycle configuration for SageMaker Notebook Instances. |
Provides a lifecycle configuration for SageMaker Notebook Instances.
Usage:
resource "aws_sagemaker_notebook_instance_lifecycle_configuration" "lc" {
name = "foo"
on_create = base64encode("echo foo")
on_start = base64encode("echo bar")
}
This resource supports the following arguments:
name
- (Optional) The name of the lifecycle configuration (must be unique). If omitted, Terraform will assign a random, unique name.on_create
- (Optional) A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.on_start
- (Optional) A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it's created.
This resource exports the following attributes in addition to the arguments above:
arn
- The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.
In Terraform v1.5.0 and later, use an import
block to import models using the name
. For example:
import {
to = aws_sagemaker_notebook_instance_lifecycle_configuration.lc
id = "foo"
}
Using terraform import
, import models using the name
. For example:
% terraform import aws_sagemaker_notebook_instance_lifecycle_configuration.lc foo