{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/9417","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/9417/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/9417/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/9417/events","html_url":"https://github.com/hashicorp/terraform/issues/9417","id":183534263,"number":9417,"title":"Scaleway: Adding multiple volumes doesn't work","user":{"login":"tboerger","id":156964,"avatar_url":"https://avatars.githubusercontent.com/u/156964?v=3","gravatar_id":"","url":"https://api.github.com/users/tboerger","html_url":"https://github.com/tboerger","followers_url":"https://api.github.com/users/tboerger/followers","following_url":"https://api.github.com/users/tboerger/following{/other_user}","gists_url":"https://api.github.com/users/tboerger/gists{/gist_id}","starred_url":"https://api.github.com/users/tboerger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tboerger/subscriptions","organizations_url":"https://api.github.com/users/tboerger/orgs","repos_url":"https://api.github.com/users/tboerger/repos","events_url":"https://api.github.com/users/tboerger/events{/privacy}","received_events_url":"https://api.github.com/users/tboerger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-17T21:35:39Z","updated_at":"2016-10-18T06:15:17Z","closed_at":null,"body":"### Terraform Version\r\n\r\n`0.7.6`\r\n\r\n### Affected Resource(s)\r\n\r\n* `scaleway_server`\r\n* `scaleway_volume`\r\n* `scaleway_volume_attachment`\r\n\r\n### Terraform Configuration Files\r\n\r\n```hcl\r\nvariable \"access\" {\r\n  type = \"string\"\r\n}\r\n\r\nvariable \"org\" {\r\n  type = \"string\"\r\n}\r\n\r\nprovider \"scaleway\" {\r\n  access_key   = \"${var.access}\"\r\n  organization = \"${var.org}\"\r\n}\r\n\r\nresource \"scaleway_server\" \"store\" {\r\n  name  = \"store\"\r\n  image = \"75c28f52-6c64-40fc-bb31-f53ca9d02de9\"\r\n  type  = \"C2S\"\r\n}\r\n\r\nresource \"scaleway_volume\" \"store\" {\r\n  count      = \"3\"\r\n  name       = \"vol-${count.index}\"\r\n  size_in_gb = \"150\"\r\n  type       = \"l_ssd\"\r\n}\r\n\r\nresource \"scaleway_volume_attachment\" \"store\" {\r\n  count  = \"3\"\r\n  volume = \"${element(scaleway_volume.store.*.id, count.index)}\"\r\n  server = \"${element(scaleway_server.store.*.id, 0)}\"\r\n}\r\n```\r\n\r\n### Debug Output\r\n\r\nhttps://gist.github.com/tboerger/c1e36a1ab2d53cfc072c6a9919bcbc66\r\n\r\n### Panic Output\r\n\r\nn/a\r\n\r\n### Expected Behavior\r\n\r\nI would expect to have a running server that got 3 additional volumes assigned.\r\n\r\n### Actual Behavior\r\n\r\nThe setup simply fails because one volume attachment invokes a reboot of the server while the next volume attachment fails because the server is not running anymore:\r\n\r\n```\r\n2 error(s) occurred:\r\n\r\n* scaleway_volume_attachment.store.2: StatusCode: 400, Type: invalid_request_error, APIMessage: server is being stopped or rebooted\r\n* scaleway_volume_attachment.store.0: StatusCode: 400, Type: invalid_request_error, APIMessage: server is being stopped or rebooted\r\n```\r\n\r\nAfter the failed action you can see on the Scaleway web UI that only one volume have been attached to the server:\r\n\r\n<img width=\"1045\" alt=\"bildschirmfoto 2016-10-17 um 23 31 16\" src=\"https://cloud.githubusercontent.com/assets/156964/19456541/20ef6e1a-94c2-11e6-9f15-5b427e0ce76f.png\">\r\n\r\n### Steps to Reproduce\r\n\r\n1. Get an `access_key` and the `organization` from your Scaleway account\r\n2. Simply execute `terraform apply` and wait\r\n\r\n### Important Factoids\r\n\r\nI tried to launch multiple nodes with multiple volumes at once, but I have slimmed down the example to keep it simple. Maybe it would already help to assign volumes while node creation, the API supports that.\r\n\r\n### References\r\n\r\nMaybe these issues are somehow related or maybe a PR solves the issue partially:\r\n\r\n* #9254\r\n* #8678\r\n\r\n/cc @nicolai86"},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/254416599","html_url":"https://github.com/hashicorp/terraform/issues/9417#issuecomment-254416599","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/9417","id":254416599,"user":{"login":"nicolai86","id":111324,"avatar_url":"https://avatars.githubusercontent.com/u/111324?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolai86","html_url":"https://github.com/nicolai86","followers_url":"https://api.github.com/users/nicolai86/followers","following_url":"https://api.github.com/users/nicolai86/following{/other_user}","gists_url":"https://api.github.com/users/nicolai86/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolai86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolai86/subscriptions","organizations_url":"https://api.github.com/users/nicolai86/orgs","repos_url":"https://api.github.com/users/nicolai86/repos","events_url":"https://api.github.com/users/nicolai86/events{/privacy}","received_events_url":"https://api.github.com/users/nicolai86/received_events","type":"User","site_admin":false},"created_at":"2016-10-18T06:15:17Z","updated_at":"2016-10-18T06:15:17Z","body":"I think supporting volumes inline would work, and to work around the VC1M issue you referenced it's probably required.\r\n\r\nThe multiple volume attachment should be fixed in any case. Luckily adding some testcases should break this reliably, and then we can fix it."}}
{"actor":{"display_login":"nicolai86"}}