-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(sagemaker notebook): Add DirectInternetAccess support #8618
feature(sagemaker notebook): Add DirectInternetAccess support #8618
Conversation
Hi @bcatubig 👋 Is this pull request still work in progress as noted by the title? Regarding the Go error you're seeing with the acceptance testing, you may find it easiest to move the source code directory outside your |
Hey @bflad -- this is ready for review/feedback. I borked my last PR for this feature by mistake. I'll try moving the folder |
@bflad Greetings, do we have any eta for when this will be released?. |
Hi, |
I'll update this branch with upstream this weekend |
Any ETA about that? |
This commit adds direct_internet_access property to SageMaker resource
PR has been re-synced with upstream. Commits have also been squashed to a single commit. |
Any update on state of this PR? Would be very usefull. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like additional merge conflicts had crept in since the last rebase due to some unrelated tagging work being done across many of the resources in the provider. Rather than further delay the introduction of this functionality, we opted to fix those and fix remaining issues as noted below. Thanks for this contribution @bcatubig 🚀
Output from acceptance testing (after adjustments):
--- PASS: TestAccAWSSagemakerNotebookInstance_LifecycleConfigName (309.31s)
--- PASS: TestAccAWSSagemakerNotebookInstance_basic (310.81s)
--- PASS: TestAccAWSSagemakerNotebookInstance_disappears (315.88s)
--- PASS: TestAccAWSSagemakerNotebookInstance_tags (318.47s)
--- PASS: TestAccAWSSagemakerNotebookInstance_update (500.90s)
--- PASS: TestAccAWSSagemakerNotebookInstance_direct_internet_access (613.14s)
|
||
resource "aws_subnet" "sagemaker" { | ||
vpc_id = "${aws_vpc.test.id}" | ||
cidr_block = "10.0.0.0/27" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test configuration is currently failing the new testing:
--- FAIL: TestAccAWSSagemakerNotebookInstance_direct_internet_access (19.44s)
testing.go:640: Step 0 error: errors during apply:
Error: Error creating subnet: InvalidSubnet.Range: The CIDR '10.0.0.0/27' is invalid.
After updating this argument, the testing was still failing with:
--- FAIL: TestAccAWSSagemakerNotebookInstance_direct_internet_access (21.87s)
testing.go:640: Step 0 error: errors during apply:
Error: Error creating Sagemaker Notebook Instance: ValidationException: Check if the security groups are specified
Adding an aws_security_group
resource and setting security_groups
in the aws_sagemaker_notebook_instance
configuration fixed the issue. We will note this requirement in the documentation as well.
@@ -72,6 +73,16 @@ func resourceAwsSagemakerNotebookInstance() *schema.Resource { | |||
ForceNew: true, | |||
}, | |||
|
|||
"direct_internet_access": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the API defaults this attribute to Enabled
, this schema also needs Default: sagemaker.DirectInternetAccessEnabled
to prevent Terraform from recreating resources which do not have it defined:
--- FAIL: TestAccAWSSagemakerNotebookInstance_basic (301.98s)
testing.go:640: Step 0 error: After applying this step, the plan was not empty:
DIFF:
DESTROY/CREATE: aws_sagemaker_notebook_instance.foo
...
direct_internet_access: "Enabled" => "" (forces new resource)
...
…rect_internet_access PR feedback Reference: #8618 Output from acceptance testing: ``` --- PASS: TestAccAWSSagemakerNotebookInstance_LifecycleConfigName (309.31s) --- PASS: TestAccAWSSagemakerNotebookInstance_basic (310.81s) --- PASS: TestAccAWSSagemakerNotebookInstance_disappears (315.88s) --- PASS: TestAccAWSSagemakerNotebookInstance_tags (318.47s) --- PASS: TestAccAWSSagemakerNotebookInstance_update (500.90s) --- PASS: TestAccAWSSagemakerNotebookInstance_direct_internet_access (613.14s) ```
This has been released in version 2.47.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Fixes #0000
Release note for CHANGELOG:
Output from acceptance testing:
I'm not able to run tests locally, would need some help with my local go setupI'm not able to run tests. I will need these to be run by another maintainer.