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.76k stars 9.12k forks source link

[Bug]: SageMaker Endpoint Creates ENIs That Don't Delete #34397

Open NonpareilNic opened 10 months ago

NonpareilNic commented 10 months ago

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 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.

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

github-actions[bot] commented 10 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

NonpareilNic commented 10 months ago

Hacked around it with local-exec in the meantime. massdriver-cloud/aws-sagemaker-inference-endpoint

drduhe commented 1 month ago

Bump