{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/3184","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/3184/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/3184/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/3184/events","html_url":"https://github.com/hashicorp/terraform/issues/3184","id":105325882,"number":3184,"title":"terraform version 0.6.3  can't destroy Amazon EC2 ","user":{"login":"udomsak","id":319024,"avatar_url":"https://avatars.githubusercontent.com/u/319024?v=3","gravatar_id":"","url":"https://api.github.com/users/udomsak","html_url":"https://github.com/udomsak","followers_url":"https://api.github.com/users/udomsak/followers","following_url":"https://api.github.com/users/udomsak/following{/other_user}","gists_url":"https://api.github.com/users/udomsak/gists{/gist_id}","starred_url":"https://api.github.com/users/udomsak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/udomsak/subscriptions","organizations_url":"https://api.github.com/users/udomsak/orgs","repos_url":"https://api.github.com/users/udomsak/repos","events_url":"https://api.github.com/users/udomsak/events{/privacy}","received_events_url":"https://api.github.com/users/udomsak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-08T08:18:33Z","updated_at":"2015-09-08T09:14:07Z","closed_at":null,"body":"I'm using with Amazon EC2 instance. create are fine. but when i'm destroy found error.  Cause terrraform  try to delete 'Security group' before destroy image.  \r\n\r\nAmazon EC2  don't allow to delete 'Security group' if you instance is 'open' or 'running state'. So Can we change step of destory plugin to \r\n\r\n1. delete or stop instande \r\n1. delete security groups\r\n\r\n## Amazon API version\r\n\r\n```\r\n1.7.5.0 2015-04-15\r\n```\r\n\r\n## Error log\r\n\r\n```\r\n2015/09/08 15:09:46 [DEBUG] vertex aws_security_group.default, waiting for: aws_security_group.default (destroy)\r\n2015/09/08 15:09:46 [DEBUG] vertex root, waiting for: provider.aws (close)\r\n2015/09/08 15:09:51 [DEBUG] vertex provider.aws (close), waiting for: aws_security_group.default\r\n2015/09/08 15:09:51 [DEBUG] vertex output.address, waiting for: aws_security_group.default\r\n2015/09/08 15:09:51 [DEBUG] vertex output.IPAddress, waiting for: aws_security_group.default\r\n2015/09/08 15:09:51 [DEBUG] vertex aws_security_group.default, waiting for: aws_security_group.default (destroy)\r\n2015/09/08 15:09:51 [DEBUG] vertex root, waiting for: provider.aws (close)\r\n2015/09/08 15:09:51 [DEBUG] root: eval: *terraform.EvalWriteState\r\n2015/09/08 15:09:51 [DEBUG] root: eval: *terraform.EvalApplyPost\r\n2015/09/08 15:09:51 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:\r\n\r\n* aws_security_group.default: DependencyViolation: resource sg-b014aed4 has a dependent object\r\n\tstatus code: 400, request id: []\r\n2015/09/08 15:09:51 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:\r\n\r\n* aws_security_group.default: DependencyViolation: resource sg-b014aed4 has a dependent object\r\n\tstatus code: 400, request id: []\r\n2015/09/08 15:09:51 [ERROR] root: eval: *terraform.EvalOpFilter, err: 1 error(s) occurred:\r\n\r\n* aws_security_group.default: DependencyViolation: resource sg-b014aed4 has a dependent object\r\n\tstatus code: 400, request id: []\r\n```\r\n\r\n```\r\nplugin process exited\r\n1 error(s) occurred:\r\n\r\n* aws_security_group.default: DependencyViolation: resource sg-b014aed4 has a dependent object\r\n\tstatus code: 400, request id: []\r\n\r\nTerraform does not automatically rollback in the face of errors.\r\nInstead, your Terraform state file has been partially updated with\r\n2015/09/08 15:09:51 [DEBUG] /Users/devops-tools/terraform-provisioner-remote-exec: plugin process exited\r\nany resources that successfully completed. Please address the error\r\nabove and apply again to incrementally change your infrastructure.\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/138491056","html_url":"https://github.com/hashicorp/terraform/issues/3184#issuecomment-138491056","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/3184","id":138491056,"user":{"login":"radeksimko","id":287584,"avatar_url":"https://avatars.githubusercontent.com/u/287584?v=3","gravatar_id":"","url":"https://api.github.com/users/radeksimko","html_url":"https://github.com/radeksimko","followers_url":"https://api.github.com/users/radeksimko/followers","following_url":"https://api.github.com/users/radeksimko/following{/other_user}","gists_url":"https://api.github.com/users/radeksimko/gists{/gist_id}","starred_url":"https://api.github.com/users/radeksimko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radeksimko/subscriptions","organizations_url":"https://api.github.com/users/radeksimko/orgs","repos_url":"https://api.github.com/users/radeksimko/repos","events_url":"https://api.github.com/users/radeksimko/events{/privacy}","received_events_url":"https://api.github.com/users/radeksimko/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T09:14:07Z","updated_at":"2015-09-08T09:14:07Z","body":"Hi @udomsak ,\r\ncould you please attach a snippet of TF config that will help us to reproduce this?"}}