{"action":"created","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-digitalocean/issues/151","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-digitalocean","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-digitalocean/issues/151/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-digitalocean/issues/151/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-digitalocean/issues/151/events","html_url":"https://github.com/terraform-providers/terraform-provider-digitalocean/issues/151","id":367973785,"node_id":"MDU6SXNzdWUzNjc5NzM3ODU=","number":151,"title":"floating_ip_assignment does not apply cleanly.","user":{"login":"stillinbeta","id":523632,"node_id":"MDQ6VXNlcjUyMzYzMg==","avatar_url":"https://avatars2.githubusercontent.com/u/523632?v=4","gravatar_id":"","url":"https://api.github.com/users/stillinbeta","html_url":"https://github.com/stillinbeta","followers_url":"https://api.github.com/users/stillinbeta/followers","following_url":"https://api.github.com/users/stillinbeta/following{/other_user}","gists_url":"https://api.github.com/users/stillinbeta/gists{/gist_id}","starred_url":"https://api.github.com/users/stillinbeta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stillinbeta/subscriptions","organizations_url":"https://api.github.com/users/stillinbeta/orgs","repos_url":"https://api.github.com/users/stillinbeta/repos","events_url":"https://api.github.com/users/stillinbeta/events{/privacy}","received_events_url":"https://api.github.com/users/stillinbeta/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-08T22:24:40Z","updated_at":"2018-10-09T20:01:13Z","closed_at":null,"author_association":"NONE","body":"### Terraform Version\r\n```\r\n$ terraform -v\r\nTerraform v0.11.8\r\n+ provider.digitalocean v1.0.0\r\n```\r\n\r\n### Affected Resource(s)\r\nPlease list the resources as a list, for example:\r\n- digitalocean_floating_ip_assignment\r\n\r\nIf this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.\r\n\r\n### Terraform Configuration Files\r\n```hcl\r\nvariable \"digital_ocean_token\" {}\r\n\r\nprovider \"digitalocean\" {\r\n  token = \"${var.digital_ocean_token}\"\r\n  version = \"1.0.0\"\r\n}\r\n\r\nresource \"digitalocean_floating_ip\" \"ip\" {\r\n  region = \"nyc1\"\r\n}\r\n\r\nresource \"digitalocean_droplet\" \"droplet\" {\r\n  name = \"mastodon\"\r\n  image = \"ubuntu-18-04-x64\"\r\n  region = \"nyc1\"\r\n  size = \"1gb\"\r\n}\r\n\r\nresource \"digitalocean_floating_ip_assignment\" \"ip_assignment\"{\r\n  droplet_id = \"${digitalocean_droplet.droplet.id}\"\r\n  ip_address = \"${digitalocean_floating_ip.ip.ip_address}\"\r\n}\r\n```\r\n\r\n### Debug Output\r\n\r\nhttps://gist.github.com/stillinbeta/20d7b6c52cb59a839b47ce0997451ebb\r\n\r\n### Panic Output\r\nnone\r\n\r\n### Expected Behavior\r\nThe floating IP address should be assigned and exit cleanly.\r\n\r\n### Actual Behavior\r\nBehind the scenes the floating IP is assigned to the appropriate droplet, but it then errors out. Because of the error, the floating IP isn't marked as assigned in the terraform state, so it will try to apply the assignment again next time Terraform is executed.\r\n\r\n```\r\nError: Error applying plan:\r\n\r\n1 error(s) occurred:\r\n\r\n* digitalocean_floating_ip_assignment.ip_assignment: 1 error(s) occurred:\r\n\r\n* digitalocean_floating_ip_assignment.ip_assignment: Error Assigning FloatingIP (165.227.254.109) to the droplet: json: cannot unmarshal number 2783182445 into Go struct field Action.resource_id of type int\r\n````\r\n\r\n\r\n### Steps to Reproduce\r\nPlease list the steps required to reproduce the issue, for example:\r\n1. Define a digital ocean key under `digital_ocean_api_key` in e.g. terraform.tfvars\r\n1. `terraform apply`\r\n\r\n### Important Factoids\r\nnone\r\n\r\n### References\r\nnone"},"comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-digitalocean/issues/comments/428330702","html_url":"https://github.com/terraform-providers/terraform-provider-digitalocean/issues/151#issuecomment-428330702","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-digitalocean/issues/151","id":428330702,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODMzMDcwMg==","user":{"login":"stillinbeta","id":523632,"node_id":"MDQ6VXNlcjUyMzYzMg==","avatar_url":"https://avatars2.githubusercontent.com/u/523632?v=4","gravatar_id":"","url":"https://api.github.com/users/stillinbeta","html_url":"https://github.com/stillinbeta","followers_url":"https://api.github.com/users/stillinbeta/followers","following_url":"https://api.github.com/users/stillinbeta/following{/other_user}","gists_url":"https://api.github.com/users/stillinbeta/gists{/gist_id}","starred_url":"https://api.github.com/users/stillinbeta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stillinbeta/subscriptions","organizations_url":"https://api.github.com/users/stillinbeta/orgs","repos_url":"https://api.github.com/users/stillinbeta/repos","events_url":"https://api.github.com/users/stillinbeta/events{/privacy}","received_events_url":"https://api.github.com/users/stillinbeta/received_events","type":"User","site_admin":false},"created_at":"2018-10-09T20:01:13Z","updated_at":"2018-10-09T20:01:13Z","author_association":"NONE","body":"It still crashes for me:\r\n```\r\n1 error(s) occurred:\r\n\r\n* digitalocean_floating_ip.ip: 1 error(s) occurred:\r\n\r\n* digitalocean_floating_ip.ip: Error Assigning FloatingIP (138.197.231.156) to the droplet: json: cannot unmarshal number 2328225692 into Go struct field Action.resource_id of type int\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\nany resources that successfully completed. Please address the error\r\nabove and apply again to incrementally change your infrastructure.\r\n\r\n\r\nzsh: exit 1     terraform apply tf.plan\r\nterraform apply tf.plan  0.89s user 0.57s system 4% cpu 36.020 total\r\n```"}}
{"actor":{"display_login":"stillinbeta"}}