{"action":"closed","issue":{"url":"https://api.github.com/repos/pulumi/pulumi-gcp/issues/50","repository_url":"https://api.github.com/repos/pulumi/pulumi-gcp","labels_url":"https://api.github.com/repos/pulumi/pulumi-gcp/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/pulumi/pulumi-gcp/issues/50/comments","events_url":"https://api.github.com/repos/pulumi/pulumi-gcp/issues/50/events","html_url":"https://github.com/pulumi/pulumi-gcp/issues/50","id":366138367,"node_id":"MDU6SXNzdWUzNjYxMzgzNjc=","number":50,"title":"race condition when changing resource ids leads to inconsistent state","user":{"login":"geekflyer","id":1221897,"node_id":"MDQ6VXNlcjEyMjE4OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/1221897?v=4","gravatar_id":"","url":"https://api.github.com/users/geekflyer","html_url":"https://github.com/geekflyer","followers_url":"https://api.github.com/users/geekflyer/followers","following_url":"https://api.github.com/users/geekflyer/following{/other_user}","gists_url":"https://api.github.com/users/geekflyer/gists{/gist_id}","starred_url":"https://api.github.com/users/geekflyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geekflyer/subscriptions","organizations_url":"https://api.github.com/users/geekflyer/orgs","repos_url":"https://api.github.com/users/geekflyer/repos","events_url":"https://api.github.com/users/geekflyer/events{/privacy}","received_events_url":"https://api.github.com/users/geekflyer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"pgavlin","id":1224093,"node_id":"MDQ6VXNlcjEyMjQwOTM=","avatar_url":"https://avatars2.githubusercontent.com/u/1224093?v=4","gravatar_id":"","url":"https://api.github.com/users/pgavlin","html_url":"https://github.com/pgavlin","followers_url":"https://api.github.com/users/pgavlin/followers","following_url":"https://api.github.com/users/pgavlin/following{/other_user}","gists_url":"https://api.github.com/users/pgavlin/gists{/gist_id}","starred_url":"https://api.github.com/users/pgavlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgavlin/subscriptions","organizations_url":"https://api.github.com/users/pgavlin/orgs","repos_url":"https://api.github.com/users/pgavlin/repos","events_url":"https://api.github.com/users/pgavlin/events{/privacy}","received_events_url":"https://api.github.com/users/pgavlin/received_events","type":"User","site_admin":false},"assignees":[{"login":"pgavlin","id":1224093,"node_id":"MDQ6VXNlcjEyMjQwOTM=","avatar_url":"https://avatars2.githubusercontent.com/u/1224093?v=4","gravatar_id":"","url":"https://api.github.com/users/pgavlin","html_url":"https://github.com/pgavlin","followers_url":"https://api.github.com/users/pgavlin/followers","following_url":"https://api.github.com/users/pgavlin/following{/other_user}","gists_url":"https://api.github.com/users/pgavlin/gists{/gist_id}","starred_url":"https://api.github.com/users/pgavlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgavlin/subscriptions","organizations_url":"https://api.github.com/users/pgavlin/orgs","repos_url":"https://api.github.com/users/pgavlin/repos","events_url":"https://api.github.com/users/pgavlin/events{/privacy}","received_events_url":"https://api.github.com/users/pgavlin/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/pulumi/pulumi-gcp/milestones/22","html_url":"https://github.com/pulumi/pulumi-gcp/milestone/22","labels_url":"https://api.github.com/repos/pulumi/pulumi-gcp/milestones/22/labels","id":3670040,"node_id":"MDk6TWlsZXN0b25lMzY3MDA0MA==","number":22,"title":"0.20","description":"","creator":{"login":"joeduffy","id":3953235,"node_id":"MDQ6VXNlcjM5NTMyMzU=","avatar_url":"https://avatars3.githubusercontent.com/u/3953235?v=4","gravatar_id":"","url":"https://api.github.com/users/joeduffy","html_url":"https://github.com/joeduffy","followers_url":"https://api.github.com/users/joeduffy/followers","following_url":"https://api.github.com/users/joeduffy/following{/other_user}","gists_url":"https://api.github.com/users/joeduffy/gists{/gist_id}","starred_url":"https://api.github.com/users/joeduffy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeduffy/subscriptions","organizations_url":"https://api.github.com/users/joeduffy/orgs","repos_url":"https://api.github.com/users/joeduffy/repos","events_url":"https://api.github.com/users/joeduffy/events{/privacy}","received_events_url":"https://api.github.com/users/joeduffy/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":1,"state":"open","created_at":"2018-09-19T02:56:56Z","updated_at":"2018-12-07T02:50:53Z","due_on":"2018-12-30T08:00:00Z","closed_at":null},"comments":2,"created_at":"2018-10-03T01:15:56Z","updated_at":"2018-12-07T02:50:53Z","closed_at":"2018-12-07T02:50:52Z","author_association":"NONE","body":"This issue pertains to certain resource types, for example `gcp.projects.IAMMember` and the order of creation / deletion of those resources. It leads to inconsistencies between what was defined in code vs what's ending up as actual configuration / resources in the cloud provider.\r\n\r\nExample:\r\n1. create this code:\r\n```ts\r\nimport * as gcp from '@pulumi/gcp';\r\n\r\nnew gcp.projects.IAMMember(`my-id`, {\r\n  member: `user:john@doe.com`,\r\n  role: 'roles/bigquery.user',\r\n  project: 'my-project'\r\n});\r\n```\r\n2. Run `pulumi up`. This will grant john@doe.com the bigquery role.\r\n3. Make a change to the resource id:\r\n```ts\r\nimport * as gcp from '@pulumi/gcp';\r\n\r\nnew gcp.projects.IAMMember(`my-id-changed`, {\r\n  member: `user:john@doe.com`,\r\n  role: 'roles/bigquery.user',\r\n  project: 'my-project'\r\n});\r\n```\r\n4. Run `pulumi up`.\r\n\r\n### Expected Result\r\nThe user john@doe.com gets granted the role`roles/bigquery.user`.\r\n\r\n### Actual Result\r\nIn step 4 pulumi **first** creates a new IAMMember with the resource id `my-id-changed` and _afterwards_ deletes the resource `my-id`.\r\nThe end result is that the user does NOT get the role `roles/bigquery.user` even though pulumi's state thinks that is the case.\r\n\r\nThis is probably a wider issue, either with the gcp provider or pulumi itself and IAMMember is just an example.\r\nFyi terraform replaces the resources in the correct order (i.e. delete old one first, create new one after)."}}
{"actor":{"display_login":"lukehoban"}}