How to know ebs device name in cloudformation template before creation of ec2 instance

Viewed 79

I'm taking reference from https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-blockdevicemappings in order to create a new instance.

While creating from portal there's an option to increase the size of OS disk(root disk). And after the instance boots it generally has this mount

/dev/nvme0n1p1                         970G  129G  842G  14% /

I want to specify the size of OS disk in template but the block device attribute has DeviceName field

enter image description here

How do I know prior to the creation of vm if the DeviceName would be /dev/nvme0n1p1? Or can it be named anything and the template will consider it as the size to give to the OS disk?

Will specifying BlockDeviceMapping add a new disk or expand the OS disk?

0 Answers
Related