{"action":"closed","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/1508","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/1508/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/1508/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/1508/events","html_url":"https://github.com/hashicorp/terraform/issues/1508","id":68134843,"number":1508,"title":"Diff mismatch when changing ForceNew and k/v attribute together","user":{"login":"phinze","id":37534,"avatar_url":"https://avatars.githubusercontent.com/u/37534?v=3","gravatar_id":"","url":"https://api.github.com/users/phinze","html_url":"https://github.com/phinze","followers_url":"https://api.github.com/users/phinze/followers","following_url":"https://api.github.com/users/phinze/following{/other_user}","gists_url":"https://api.github.com/users/phinze/gists{/gist_id}","starred_url":"https://api.github.com/users/phinze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phinze/subscriptions","organizations_url":"https://api.github.com/users/phinze/orgs","repos_url":"https://api.github.com/users/phinze/repos","events_url":"https://api.github.com/users/phinze/events{/privacy}","received_events_url":"https://api.github.com/users/phinze/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/core","name":"core","color":"cccccc"}],"state":"closed","locked":false,"assignee":{"login":"phinze","id":37534,"avatar_url":"https://avatars.githubusercontent.com/u/37534?v=3","gravatar_id":"","url":"https://api.github.com/users/phinze","html_url":"https://github.com/phinze","followers_url":"https://api.github.com/users/phinze/followers","following_url":"https://api.github.com/users/phinze/following{/other_user}","gists_url":"https://api.github.com/users/phinze/gists{/gist_id}","starred_url":"https://api.github.com/users/phinze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phinze/subscriptions","organizations_url":"https://api.github.com/users/phinze/orgs","repos_url":"https://api.github.com/users/phinze/repos","events_url":"https://api.github.com/users/phinze/events{/privacy}","received_events_url":"https://api.github.com/users/phinze/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-04-13T16:11:08Z","updated_at":"2015-04-14T22:44:28Z","closed_at":"2015-04-14T22:44:28Z","body":"I'm tracking this with google_compute_instance, but I believe it's a core bug.\r\n\r\n### Given\r\n\r\nA resource definition with:\r\n\r\n * A ForceNew attribute\r\n * A Map attribute\r\n\r\ne.g.\r\n\r\n```go\r\n&schema.Resource{\r\n  Schema: map[string]*schema.Schema{\r\n    \"foo\": {\r\n      Type: schema.TypeString,\r\n      Required: true,\r\n      ForceNew: true,\r\n    },\r\n    \"bar\": {\r\n      Type: schema.TypeMap,\r\n      Optional: true,\r\n      Elem: schema.TypeString,\r\n    },\r\n  },\r\n}\r\n```\r\n\r\n### When\r\n\r\nI attempt to apply a change that updates both the `ForceNew` attr and updates the map in such a way that that changes the set of keys.\r\n\r\ne.g.\r\n\r\nFrom a successful apply of this config that creates the resource:\r\n\r\n```js\r\nresource \"some_resource\" \"some_name\" {\r\n  foo = \"one\"\r\n  bar {\r\n    one = true\r\n  }\r\n}\r\n```\r\n\r\nAn attempt to apply this config: \r\n\r\n```js\r\nresource \"some_resource\" \"some_name\" {\r\n  foo = \"two\"\r\n  bar {\r\n    two = true\r\n  }\r\n}\r\n```\r\n\r\n### I expect\r\n\r\nThe resource to be replaced.\r\n\r\n### Instead I see\r\n\r\nYe olde \"diffs didn't match error\", like so:\r\n\r\n```\r\nsome_resource.some_name: diffs didn't match\r\nsome_resource.some_name: reason: attribute mismatch: bar.one\r\n```\r\n\r\nDiff one (diff from the plan) shows `\"one\"` going from `\"true\" -> \"\"`, and `\"two\"` going from `\"\" -> \"true\"`.\r\nDiff two (diff during apply) only shows `\"two\"` in the diff.\r\n"}}