{"action":"opened","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/4394","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/4394/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/4394/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/4394/events","html_url":"https://github.com/hashicorp/terraform/issues/4394","id":123086374,"number":4394,"title":"Don't try to recreate things which are not allowed to edit on Google Cloud","user":{"login":"phanect","id":315601,"avatar_url":"https://avatars.githubusercontent.com/u/315601?v=3","gravatar_id":"","url":"https://api.github.com/users/phanect","html_url":"https://github.com/phanect","followers_url":"https://api.github.com/users/phanect/followers","following_url":"https://api.github.com/users/phanect/following{/other_user}","gists_url":"https://api.github.com/users/phanect/gists{/gist_id}","starred_url":"https://api.github.com/users/phanect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phanect/subscriptions","organizations_url":"https://api.github.com/users/phanect/orgs","repos_url":"https://api.github.com/users/phanect/repos","events_url":"https://api.github.com/users/phanect/events{/privacy}","received_events_url":"https://api.github.com/users/phanect/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-19T13:52:42Z","updated_at":"2015-12-19T13:52:42Z","closed_at":null,"body":"Problem\r\n------------\r\n\r\nFor example, when you try to run following .tf.json file twice, you will get error message.\r\n\r\n.tf.json file:\r\n\r\n```json\r\n    google_dns_managed_zone: {\r\n      test: {\r\n        name:        \"${ var.app_name }\",\r\n        dns_name:    \"test.example.io.\",\r\n        description: \"test\"\r\n      }\r\n    }\r\n```\r\nNote: I'm writing in JSON5 format, so above is not actually a JSON.\r\n\r\nerror message:\r\n\r\n```\r\n* google_dns_managed_zone.notel: Error creating DNS ManagedZone: googleapi: Error 409: The resource 'entity.managedZone' named 'notel' already exists, alreadyExists\r\n```\r\n\r\nThis happens `google_dns_managed_zone`, `google_compute_network`, `google_compute_http_health_check`, and some other resources.\r\n\r\nI can't apply the same .tf.json file more than 2 times.\r\n\r\nSuggestion\r\n---------------\r\nHow about following improvements?:\r\n\r\n- If the configuration is exactly the same as current GCP config, do nothing and no error message is shown.\r\n- If the configuration is different from current GCP config, delete and recreate current resource.\r\n  - Before deletion, I think terraform should ask user if you really recreate the resource because it causes downtime.\r\n\r\nI'm really appreciate if those improvements, especially first one, are implemented."}}