I am trying to use terraform to create a r3.large instance in AWS.
Here's a snippet of my AMI definition in terraform.
resource "aws_instance" "centos-server" {
ephemeral_block_device {
device_name = "/dev/xvdf"
virtual_name = "ephemeral0"
}
user_data = "${file("./user-data.yml")}"
}
and my user-data.yml file
#cloud-config
device_aliases:
'ephemeral0': '/dev/xvdf'
disk_setup:
ephmeral0:
table_type: 'mbr'
layout: true
overwrite: true
fs_setup:
- label: ephemeral0
filesystem: ext4
device: ephemeral0
partition: auto
mounts:
- [ ephemeral0, "/media/ephemeral0", "ext4", "noatime", "0", "2" ]
When I ssh into the running instance, I can see the instance store with a "fdisk -l" but it's not formatted or partitioned.
Edit: Added a snippet of the cloud-init log
Cloud-init v. 0.7.5 running 'modules:config' at Wed, 07 Feb 2018 19:09:33 +0000. Up 41.76 seconds.
2018-02-07 19:09:33,600 - util.py[WARNING]: Activating mounts via 'mount -a' failed