Helder Sepulveda
Helder Sepulveda

Reputation: 17594

AWS EC2 adding volume ephemeral volume with Terraform

I have the following Terraform code:

resource "aws_instance" "suse12" {
  count                  = "${var.ec2_enabled}"
  ami                    = "${data.aws_ami.suse12.id}"
  instance_type          = "m5d.large"
  key_name               = "${aws_key_pair.sshkey.key_name}"
  vpc_security_group_ids = ["${aws_security_group.allow_all.id}"]
  availability_zone      = "${data.aws_availability_zones.available.names[0]}"

  ephemeral_block_device {
    virtual_name = "ephemeral0"
    device_name  = "/dev/sde"
  }
}

That creates the ec2 instance just fine...
but the ephemeral volume is not in the list of volumes, any ideas why not?

Upvotes: 2

Views: 1622

Answers (1)

Jakub Kania
Jakub Kania

Reputation: 16487

Ephemeral drives are not EBS and therefore don't show in the console.

To see ephemeral devices in your instance you have to ssh into the machine and use lsblk to show all block devices connected to instance.

Upvotes: 4

Related Questions