{"action":"closed","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/4941","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/4941/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/4941/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/4941/events","html_url":"https://github.com/hashicorp/terraform/issues/4941","id":130475957,"number":4941,"title":"terraform-plan doesn't properly detect deletion of aws_dynamodb_table","user":{"login":"RevCBH","id":200764,"avatar_url":"https://avatars.githubusercontent.com/u/200764?v=3","gravatar_id":"","url":"https://api.github.com/users/RevCBH","html_url":"https://github.com/RevCBH","followers_url":"https://api.github.com/users/RevCBH/followers","following_url":"https://api.github.com/users/RevCBH/following{/other_user}","gists_url":"https://api.github.com/users/RevCBH/gists{/gist_id}","starred_url":"https://api.github.com/users/RevCBH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RevCBH/subscriptions","organizations_url":"https://api.github.com/users/RevCBH/orgs","repos_url":"https://api.github.com/users/RevCBH/repos","events_url":"https://api.github.com/users/RevCBH/events{/privacy}","received_events_url":"https://api.github.com/users/RevCBH/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/terraform/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/provider/aws","name":"provider/aws","color":"bfdadc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-01T20:38:00Z","updated_at":"2016-02-06T23:47:41Z","closed_at":"2016-02-06T23:47:41Z","body":"I created a DynamoDB table via an aws_dynamodb_table resource, like so:\r\n\r\n```\r\nresource \"aws_dynamodb_table\" \"artifact_versions\" {\r\n    name = \"artifact_versions\"\r\n    read_capacity = 10\r\n    write_capacity = 10\r\n    hash_key = \"name\"\r\n    range_key = \"version\"\r\n\r\n    attribute {\r\n        name = \"name\"\r\n        type = \"S\"\r\n    }\r\n\r\n    attribute {\r\n        name = \"version\"\r\n        type = \"N\"\r\n    }\r\n}\r\n```\r\n\r\nAfter manually deleting the table via the console, plan and refresh both fail with:\r\n```\r\nError refreshing state: 1 error(s) occurred:\r\n\r\n* aws_dynamodb_table.artifact_versions: ResourceNotFoundException: Requested resource not found: Table: artifact_versions not found\r\n\tstatus code: 400, request id: K48PDTDQ8MRA491KUGULQG03FNVV4KQNSO5AEMVJF66Q9ASUAAJG\r\n```\r\n\r\nI was able to proceed after manually removing references to the table in the tfstate file."}}