hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.77k stars 9.12k forks source link

[Enhancement]: Additional app types in aws_sagemaker_app #36008

Open michaelneely opened 7 months ago

michaelneely commented 7 months ago

Description

App types JupyterLab and CodeEditor are currently not supported when creating an aws_sagemaker_app.

If you try and create a aws_sagemaker_app resource with app type JupyterLab or CodeEditor, the application is actually created, but TF will time out with error:

│ Error: create SageMaker App (arn:aws:sagemaker:.../codeeditor/...): waiting for completion: couldn't find resource (21 retries)

The application can be accessed via the sagemaker UI, but is not visible to terraform and cannot be imported. I suspect this is because these app types aren't included here: https://github.com/hashicorp/terraform-provider-aws/blob/c71d8ec819c8dd1f29f7cfdaadbe1aac8fc7d233/internal/service/sagemaker/app.go#L252

Affected Resource(s) and/or Data Source(s)

aws_sagemaker_app

Potential Terraform Configuration

No response

References

Additional app types were added to aws_sagemaker_studio_lifecycle_config here: https://github.com/hashicorp/terraform-provider-aws/issues/35332

Would you like to implement a fix?

None

github-actions[bot] commented 7 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

michaelneely commented 7 months ago

Dare I hope that something as simple as: https://github.com/hashicorp/terraform-provider-aws/pull/36011 would resolve this issue?

Zesky665 commented 7 months ago

@michaelneely I'm grappling with the same problem as well. I'm trying to create a jupyter-lab app, but it's giving me an error message saying that I need to specify a sagemaker-Image-arn.

michaelneely commented 6 months ago

@michaelneely I'm grappling with the same problem as well. I'm trying to create a jupyter-lab app, but it's giving me an error message saying that I need to specify a sagemaker-Image-arn.

Make sure you add the resource spec. See: https://docs.aws.amazon.com/sagemaker/latest/dg/notebooks-available-images.html for available images.

For example:

resource_spec {
  instance_type = "ml.t3.medium"
  sagemaker_image_arn = "arn:aws:sagemaker:eu-west-2:021081402939:image/sagemaker-distribution-cpu"
  sagemaker_image_version_alias = "1.4.3"
}
Zesky665 commented 6 months ago

@michaelneely I eventually figured out what I was doing wrong. The issue wasn't the image, I had a typo, my copilot added 'sagemaker_image_id' and 'sagemaker_image_arn'. Everything works now.

github-actions[bot] commented 5 months ago

[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.