Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: support for no_device in aws_instance ephemeral_block_device #8455

Closed
mblakele opened this issue Aug 24, 2016 · 3 comments · Fixed by #10547
Closed

RFE: support for no_device in aws_instance ephemeral_block_device #8455

mblakele opened this issue Aug 24, 2016 · 3 comments · Fixed by #10547

Comments

@mblakele
Copy link
Contributor

Terraform Version

Terraform v0.7.1

Affected Resource(s)

Please list the resources as a list, for example:

  • aws_instance

Terraform Configuration Files

resource "aws_instance" "test" {
  # Block ephemeral storage, which confuses the setup process.
  ephemeral_block_device {
    device_name = "/dev/sdb"
    no_device = "true"
    virtual_name = "ephemeral0"
  }
}

Expected Behavior

If I'm reading https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html correctly, terraform should set NoDevice for the specified device_name.

To add volumes to an instance using the command line
...

For example, suppose that an EBS-backed AMI specifies the following block device mapping:

/dev/sdb=ephemeral0
/dev/sdh=snap-1234567890abcdef0
/dev/sdj=:100
To prevent /dev/sdj from attaching to an instance launched from this AMI, use the following mapping:

{
    "DeviceName": "/dev/sdj",
    "NoDevice": ""
}

Also virtual_name probably shouldn't be there when no_device is set — but terraform 0.7.1 requires it.

Actual Behavior

aws_instance.test: ephemeral_block_device.0: invalid or unknown key: no_device

Steps to Reproduce

  1. terraform plan

Possible workaround: create the AMI without the ephemeral mappings. But I'd rather not do that because I'd have to maintain two AMIs and that would be the only difference between them.

@jweir
Copy link

jweir commented Sep 19, 2016

This issue is burning me too. Packer had this issue and was fixed via hashicorp/packer@2a94b59

@timonwong
Copy link
Contributor

Hi, when this issue is fixed, it should address #5390, when the BlockingMappingDevice from an AMI contains ephemerals, "NoDevice" have to be set on EBS-only instance, or the AutoRecover feature from AWS won't work.

timonwong added a commit to timonwong/terraform that referenced this issue Dec 6, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
timonwong added a commit to timonwong/terraform that referenced this issue Dec 6, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
timonwong added a commit to timonwong/terraform that referenced this issue Dec 6, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
timonwong added a commit to timonwong/terraform that referenced this issue Dec 6, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
timonwong added a commit to timonwong/terraform that referenced this issue Dec 6, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
timonwong added a commit to timonwong/terraform that referenced this issue Dec 6, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
timonwong added a commit to timonwong/terraform that referenced this issue Dec 6, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
timonwong added a commit to timonwong/terraform that referenced this issue Dec 6, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
timonwong added a commit to timonwong/terraform that referenced this issue Dec 6, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
timonwong added a commit to timonwong/terraform that referenced this issue Dec 6, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
timonwong added a commit to timonwong/terraform that referenced this issue Dec 6, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
timonwong added a commit to timonwong/terraform that referenced this issue Dec 6, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
timonwong added a commit to timonwong/terraform that referenced this issue Dec 6, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
timonwong added a commit to timonwong/terraform that referenced this issue Dec 6, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
timonwong added a commit to timonwong/terraform that referenced this issue Dec 7, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
timonwong added a commit to timonwong/terraform that referenced this issue Dec 7, 2016
Fixes hashicorp#8455, hashicorp#5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
stack72 pushed a commit that referenced this issue Dec 8, 2016
)

Fixes #8455, #5390

This add a new `no_device` attribute to `ephemeral_block_device` block,
which allows users omit ephemeral devices from AMI's predefined block
device mappings, which is useful for EBS-only instance types.
@ghost
Copy link

ghost commented Apr 19, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants