{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/10432","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/10432/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/10432/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/10432/events","html_url":"https://github.com/hashicorp/terraform/issues/10432","id":192519928,"number":10432,"title":"AWS: During instance creation, ephemeral devices are not filtered for EBS only instances","user":{"login":"timonwong","id":1398228,"avatar_url":"https://avatars.githubusercontent.com/u/1398228?v=3","gravatar_id":"","url":"https://api.github.com/users/timonwong","html_url":"https://github.com/timonwong","followers_url":"https://api.github.com/users/timonwong/followers","following_url":"https://api.github.com/users/timonwong/following{/other_user}","gists_url":"https://api.github.com/users/timonwong/gists{/gist_id}","starred_url":"https://api.github.com/users/timonwong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timonwong/subscriptions","organizations_url":"https://api.github.com/users/timonwong/orgs","repos_url":"https://api.github.com/users/timonwong/repos","events_url":"https://api.github.com/users/timonwong/events{/privacy}","received_events_url":"https://api.github.com/users/timonwong/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-30T09:48:52Z","updated_at":"2016-11-30T15:09:12Z","closed_at":"2016-11-30T14:56:21Z","body":"### Terraform Version\r\n\r\nTerraform v0.8.0-dev\r\n\r\n### Affected Resource(s)\r\n- aws_instance\r\n\r\nWhen creating EC2 instances, ephemeral devices may be pulled from AMI BlockDeviceMapping and pass down to `RunInstance`, if we are using EBS-only instances (`c4.*`, `m4.*` for example), even AWS won't throw any errors about it, the created instances will contain those \"dummy\" ephemeral devices, this will block users from configuring [Auto Recover](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html).\r\n\r\nFor example, this Ubuntu image (in us-west-2) contains two ephemeral devices:\r\n![image](https://cloud.githubusercontent.com/assets/1398228/20747108/ce9bad34-b723-11e6-9404-6aaf7b25cf98.png)\r\n\r\nThough in GH-5388, the auto recover functionality can created through AWS API (terraform), confirmed by AWS support guy, even \"Auto Recover\" alarm is created through API, it **won't work**, because there are \"dummy\" ephemeral devices inside the instance.\r\n\r\nSo should we filtered out those ephemeral devices in AMI, if the target instance type is EBS only?\r\n\r\nThanks in advance\r\n\r\nTimon\r\n\r\n\r\n*Side note: This ticket may duplicate GH-5390.*"},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/263896930","html_url":"https://github.com/hashicorp/terraform/issues/10432#issuecomment-263896930","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/10432","id":263896930,"user":{"login":"timonwong","id":1398228,"avatar_url":"https://avatars.githubusercontent.com/u/1398228?v=3","gravatar_id":"","url":"https://api.github.com/users/timonwong","html_url":"https://github.com/timonwong","followers_url":"https://api.github.com/users/timonwong/followers","following_url":"https://api.github.com/users/timonwong/following{/other_user}","gists_url":"https://api.github.com/users/timonwong/gists{/gist_id}","starred_url":"https://api.github.com/users/timonwong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timonwong/subscriptions","organizations_url":"https://api.github.com/users/timonwong/orgs","repos_url":"https://api.github.com/users/timonwong/repos","events_url":"https://api.github.com/users/timonwong/events{/privacy}","received_events_url":"https://api.github.com/users/timonwong/received_events","type":"User","site_admin":false},"created_at":"2016-11-30T15:09:12Z","updated_at":"2016-11-30T15:09:12Z","body":"Sorry for this one, I bring up `terraform apply` with TF_LOG=trace, so it seems it's a AWS API bug:\r\n\r\n```\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform: <?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform: <RunInstancesResponse xmlns=\"http://ec2.amazonaws.com/doc/2016-09-15/\">\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:     <requestId>xxx-xxxx-xxxxxx</requestId>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:     <reservationId>r-xxxxx</reservationId>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:     <ownerId>xxxxxxxxxx</ownerId>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:     <groupSet/>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:     <instancesSet>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:         <item>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <instanceId>i-xxxxx</instanceId>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <imageId>ami-xxxxx</imageId>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <instanceState>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                 <code>0</code>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                 <name>pending</name>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             </instanceState>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <privateDnsName>ip-xxxxxxxxxxxxx.cn-north-1.compute.internal</privateDnsName>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <dnsName/>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <reason/>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <keyName>xxxxxxxxxxxxxx</keyName>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <amiLaunchIndex>0</amiLaunchIndex>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <productCodes/>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <instanceType>c4.4xlarge</instanceType>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <launchTime>2016-11-30T15:02:08.000Z</launchTime>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <placement>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                 <availabilityZone>cn-north-1a</availabilityZone>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                 <groupName/>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                 <tenancy>default</tenancy>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             </placement>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <monitoring>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                 <state>pending</state>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             </monitoring>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <subnetId>subnet-xxxxxxxxxx</subnetId>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <vpcId>vpc-xxxxxxxxxxx</vpcId>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <privateIpAddress>10.100.40.13</privateIpAddress>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <sourceDestCheck>true</sourceDestCheck>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <groupSet>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                 <item>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     <groupId>sg-xxxxxxxxxxx</groupId>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     <groupName>cassandra-sg</groupName>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                 </item>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             </groupSet>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <stateReason>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                 <code>pending</code>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                 <message>pending</message>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             </stateReason>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <architecture>x86_64</architecture>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <rootDeviceType>ebs</rootDeviceType>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <rootDeviceName>/dev/sda1</rootDeviceName>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <blockDeviceMapping/>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <virtualizationType>hvm</virtualizationType>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <clientToken/>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <hypervisor>xen</hypervisor>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <networkInterfaceSet>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                 <item>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     <networkInterfaceId>eni-xxxxx</networkInterfaceId>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     <subnetId>subnet-6830050d</subnetId>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     <vpcId>vpc-xxxxxxxxxx</vpcId>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     <description/>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     <ownerId>249677265377</ownerId>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     <status>in-use</status>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     <macAddress>02:af:22:ee:a7:e4</macAddress>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     <privateIpAddress>10.100.40.13</privateIpAddress>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     <privateDnsName>ip-xxxxxxxxx.cn-north-1.compute.internal</privateDnsName>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     <sourceDestCheck>true</sourceDestCheck>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     <groupSet>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                         <item>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                             <groupId>sg-xxxxxxxxxxxxx</groupId>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                             <groupName>cassandra-sg</groupName>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                         </item>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     </groupSet>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     <attachment>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                         <attachmentId>eni-attach-xxxxxxxxxxx</attachmentId>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                         <deviceIndex>0</deviceIndex>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                         <status>attaching</status>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                         <attachTime>2016-11-30T15:02:08.000Z</attachTime>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                         <deleteOnTermination>true</deleteOnTermination>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     </attachment>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     <privateIpAddressesSet>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                         <item>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                             <privateIpAddress>10.100.40.13</privateIpAddress>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                             <privateDnsName>ip-xxxxxxxxxx.cn-north-1.compute.internal</privateDnsName>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                             <primary>true</primary>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                         </item>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                     </privateIpAddressesSet>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                 </item>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             </networkInterfaceSet>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <iamInstanceProfile>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                 <arn>arn:aws-cn:iam::*******:instance-profile/cassandra</arn>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:                 <id>*******</id>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             </iamInstanceProfile>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:             <ebsOptimized>true</ebsOptimized>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:         </item>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform:     </instancesSet>\r\n2016/11/30 23:02:09 [DEBUG] plugin: terraform: </RunInstancesResponse>\r\n```"}}
{"actor":{"display_login":"timonwong"}}