When creating an AWS SageMaker Endpoint, I expect the ENI that SageMaker creates in the background (which I have no terraform control over) to have Delete on termination set to True so that when the Endpoint is deleted, the ENI will be deleted, and in turn, my Security Group that I've attached to the Model can be deleted as part of terrarform destroy
Actual Behavior
The ENI is set as Delete on termination = False and when terraform destroy is run the Security Group has a dependency violation because the ENI is orphaned but not deleted.
deleting Security Group (sg-0336df6f0f8842af9): DependencyViolation: resource sg-0336df6f0f8842af9 has a dependent object status code: 400, request id: 69ad5b17-714f-47ca-b2d9-bee0dc144ac7
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.6.3
AWS Provider Version
5.25.0
Affected Resource(s)
aws_sagemaker_endpoint
Expected Behavior
When creating an AWS SageMaker Endpoint, I expect the ENI that SageMaker creates in the background (which I have no terraform control over) to have
Delete on termination
set to True so that when the Endpoint is deleted, the ENI will be deleted, and in turn, my Security Group that I've attached to the Model can be deleted as part ofterrarform destroy
Actual Behavior
The ENI is set as
Delete on termination = False
and whenterraform destroy
is run the Security Group has a dependency violation because the ENI is orphaned but not deleted.Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
aws-sagemaker-inference-endpoint
Steps to Reproduce
terraform apply terraform destroy
Debug Output
deleting Security Group (sg-0336df6f0f8842af9): DependencyViolation: resource sg-0336df6f0f8842af9 has a dependent object status code: 400, request id: 69ad5b17-714f-47ca-b2d9-bee0dc144ac7
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None