{"action":"created","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/5589","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/5589/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/5589/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/5589/events","html_url":"https://github.com/terraform-providers/terraform-provider-aws/issues/5589","id":351504694,"node_id":"MDU6SXNzdWUzNTE1MDQ2OTQ=","number":5589,"title":"data.aws_storagegateway_local_disk : no results found for query","user":{"login":"undercover1769","id":28652206,"node_id":"MDQ6VXNlcjI4NjUyMjA2","avatar_url":"https://avatars2.githubusercontent.com/u/28652206?v=4","gravatar_id":"","url":"https://api.github.com/users/undercover1769","html_url":"https://github.com/undercover1769","followers_url":"https://api.github.com/users/undercover1769/followers","following_url":"https://api.github.com/users/undercover1769/following{/other_user}","gists_url":"https://api.github.com/users/undercover1769/gists{/gist_id}","starred_url":"https://api.github.com/users/undercover1769/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/undercover1769/subscriptions","organizations_url":"https://api.github.com/users/undercover1769/orgs","repos_url":"https://api.github.com/users/undercover1769/repos","events_url":"https://api.github.com/users/undercover1769/events{/privacy}","received_events_url":"https://api.github.com/users/undercover1769/received_events","type":"User","site_admin":false},"labels":[{"id":620316241,"node_id":"MDU6TGFiZWw2MjAzMTYyNDE=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/labels/enhancement","name":"enhancement","color":"d4c5f9","default":true},{"id":801971602,"node_id":"MDU6TGFiZWw4MDE5NzE2MDI=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/labels/service/storagegateway","name":"service/storagegateway","color":"bfd4f2","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/milestones/37","html_url":"https://github.com/terraform-providers/terraform-provider-aws/milestone/37","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/milestones/37/labels","id":3576807,"node_id":"MDk6TWlsZXN0b25lMzU3NjgwNw==","number":37,"title":"v1.33.0","description":"","creator":{"login":"bflad","id":189114,"node_id":"MDQ6VXNlcjE4OTExNA==","avatar_url":"https://avatars3.githubusercontent.com/u/189114?v=4","gravatar_id":"","url":"https://api.github.com/users/bflad","html_url":"https://github.com/bflad","followers_url":"https://api.github.com/users/bflad/followers","following_url":"https://api.github.com/users/bflad/following{/other_user}","gists_url":"https://api.github.com/users/bflad/gists{/gist_id}","starred_url":"https://api.github.com/users/bflad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bflad/subscriptions","organizations_url":"https://api.github.com/users/bflad/orgs","repos_url":"https://api.github.com/users/bflad/repos","events_url":"https://api.github.com/users/bflad/events{/privacy}","received_events_url":"https://api.github.com/users/bflad/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":57,"state":"open","created_at":"2018-08-16T17:38:10Z","updated_at":"2018-08-22T18:42:57Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2018-08-17T08:32:37Z","updated_at":"2018-08-22T18:42:57Z","closed_at":"2018-08-22T18:42:57Z","author_association":"NONE","body":"### Community Note\r\n\r\n* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request\r\n* Please do not leave \"+1\" or \"me too\" comments, they generate extra noise for issue followers and do not help prioritize the request\r\n* If you are interested in working on this issue or have submitted a pull request, please leave a comment\r\n\r\n### Terraform Version\r\n\r\n$ terraform -v\r\nTerraform v0.11.8\r\n\r\n### Affected Resource(s)\r\n\r\n* aws_storagegateway_local_disk\r\n\r\n### Terraform Configuration Files\r\n\r\n<!--- Information about code formatting: https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code --->\r\n\r\n```hcl\r\nresource \"aws_instance\" \"fg_instance\" {\r\n  ami                    = \"ami-0de87dd1829f3d12e\"\r\n  instance_type          = \"m5.2xlarge\"\r\n  availability_zone      = \"eu-west-2a\"\r\n  key_name               = \"${var.instance_key_name_test}\"\r\n  subnet_id              = \"${element(var.private_subnets_ids_test, count.index)}\"\r\n  vpc_security_group_ids = [\"sg-1\", \"sg-2\", \"sg-3\"]\r\n}\r\n\r\nresource \"aws_ebs_volume\" \"sdb\" {\r\n  availability_zone = \"eu-west-2a\"\r\n  size              = 150\r\n  type              = \"gp2\"\r\n}\r\n\r\nresource \"aws_volume_attachment\" \"sdb_attach\" {\r\n  device_name  = \"/dev/sdb\"\r\n  volume_id    = \"${aws_ebs_volume.sdb.id}\"\r\n  instance_id  = \"${aws_instance.fg_instance.id}\"\r\n  skip_destroy = false\r\n}\r\n\r\nresource \"aws_storagegateway_gateway\" \"fg\" {\r\n  gateway_ip_address = \"${aws_instance.fg_instance.private_ip}\"\r\n  gateway_name       = \"my_fg\"\r\n  gateway_timezone   = \"GMT\"\r\n  gateway_type       = \"FILE_S3\"\r\n}\r\n\r\ndata \"aws_storagegateway_local_disk\" \"fg_disk\" {\r\n  disk_path   = \"${aws_volume_attachment.sdb_attach.device_name}\"\r\n  gateway_arn = \"${aws_storagegateway_gateway.fg.arn}\"\r\n}\r\n\r\nresource \"aws_storagegateway_cache\" \"fg_cache\" {\r\n  disk_id     = \"${data.aws_storagegateway_local_disk.fg_disk.id}\"\r\n  gateway_arn = \"${aws_storagegateway_gateway.fg.arn}\"\r\n}\r\n\r\n```\r\n### Expected Behavior\r\n\r\nFile Gateway should be created with the attached volume added as a cache disk\r\n\r\n### Actual Behavior\r\n\r\nThe File Gateway is created and activated and all OK, but the Terraform apply ends with the following error:\r\n\r\n```Error: Error applying plan:\r\n\r\n1 error(s) occurred:\r\n\r\n* data.aws_storagegateway_local_disk.fg_disk: data.aws_storagegateway_local_disk.fg_disk: no results found for query, try adjusting your search criteria\r\n```\r\n\r\nI can still then go into the AWS console and add the cache disk manually without any errors.\r\n\r\n### Steps to Reproduce\r\n\r\n1. `terraform apply`\r\n\r\n### References\r\n\r\n```aws_storagegateway_gateway.fg:\r\n  id = arn:aws:storagegateway:eu-west-2:123456789012:gateway/sgw-1234567\r\n  activation_key = \r\n  arn = arn:aws:storagegateway:eu-west-2:123456789012:gateway/sgw-1234567\r\n  gateway_id = sgw-1234567\r\n  gateway_ip_address = 1.1.1.1\r\n  gateway_name = my_fg\r\n  gateway_timezone = GMT\r\n  gateway_type = FILE_S3\r\n  medium_changer_type = \r\n  smb_active_directory_settings.# = 0\r\n  smb_guest_password = \r\n  tape_drive_type = \r\naws_volume_attachment.sdb_attach:\r\n  id = vai-1558009518\r\n  device_name = /dev/sdb\r\n  instance_id = i-06202ffc79ebd30cd\r\n  skip_destroy = false\r\n  volume_id = vol-0a01f79981869d914\r\n```\r\n\r\n```{\r\n    \"Gateways\": [\r\n        {\r\n            \"GatewayId\": \"sgw-1234567\",\r\n            \"GatewayARN\": \"arn:aws:storagegateway:eu-west-2:123456789012:gateway/sgw-1234567\",\r\n            \"GatewayName\": \"my_fg\",\r\n            \"GatewayOperationalState\": \"ACTIVE\",\r\n            \"GatewayType\": \"FILE_S3\"\r\n        }\r\n    ]\r\n}```\r\n\r\n'''$ aws storagegateway list-local-disks --gateway-arn  arn:aws:storagegateway:eu-west-2:123456789012:gateway/sgw-1234567\r\n{\r\n    \"GatewayARN\": \"arn:aws:storagegateway:eu-west-2:123456789012:gateway/sgw-1234567\",\r\n    \"Disks\": [\r\n        {\r\n            \"DiskSizeInBytes\": 161061273600,\r\n            \"DiskAllocationType\": \"AVAILABLE\",\r\n            \"DiskPath\": \"/dev/nvme1n1\",\r\n            \"DiskStatus\": \"present\",\r\n            \"DiskId\": \"pci-0000:00:1f.0\",\r\n            \"DiskNode\": \"/dev/sdb\"\r\n        }\r\n    ]\r\n}\r\n\r\n\r\n* #0000\r\n"},"comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/comments/415137254","html_url":"https://github.com/terraform-providers/terraform-provider-aws/issues/5589#issuecomment-415137254","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/5589","id":415137254,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTEzNzI1NA==","user":{"login":"bflad","id":189114,"node_id":"MDQ6VXNlcjE4OTExNA==","avatar_url":"https://avatars3.githubusercontent.com/u/189114?v=4","gravatar_id":"","url":"https://api.github.com/users/bflad","html_url":"https://github.com/bflad","followers_url":"https://api.github.com/users/bflad/followers","following_url":"https://api.github.com/users/bflad/following{/other_user}","gists_url":"https://api.github.com/users/bflad/gists{/gist_id}","starred_url":"https://api.github.com/users/bflad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bflad/subscriptions","organizations_url":"https://api.github.com/users/bflad/orgs","repos_url":"https://api.github.com/users/bflad/repos","events_url":"https://api.github.com/users/bflad/events{/privacy}","received_events_url":"https://api.github.com/users/bflad/received_events","type":"User","site_admin":false},"created_at":"2018-08-22T18:42:57Z","updated_at":"2018-08-22T18:42:57Z","author_association":"CONTRIBUTOR","body":"The `disk_node` support for `aws_storagegateway_local_disk` has been released in [version 1.33.0 of the AWS provider](https://github.com/terraform-providers/terraform-provider-aws/blob/master/CHANGELOG.md#1330-august-22-2018). Give it a shot and let us know if it doesn't solve this problem.\r\n\r\nPlease see the [Terraform documentation on provider versioning](https://www.terraform.io/docs/configuration/providers.html#provider-versions) or reach out if you need any assistance upgrading."}}
{"actor":{"display_login":"bflad"}}