Skip to content

Commit dae26ee

Browse files
builder: improve documentation on virtual_name
The `virtual_name` attribute for block devices did not have a clear documentation, which led to confusion for users of the plugin. This commit enhances this to clarify these are expected to have a specific format, and are only for instance-based (ephemeral) volumes.
1 parent a89fa76 commit dae26ee

7 files changed

Lines changed: 49 additions & 7 deletions

File tree

.web-docs/components/builder/chroot/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,14 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept
500500
[Throughput](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html)
501501
for more information
502502

503-
- `virtual_name` (string) - The virtual device name. See the documentation on Block Device Mapping
503+
- `virtual_name` (string) - The virtual device name. See the documentation on
504+
[Block Device Mapping](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
504505
for more information.
506+
507+
Note: virtual_name only applies for ephemeral (instance) volumes. Any
508+
EBS-backed volume will have a `snapshot_id` instead.
509+
510+
The volume virtual_name should be in the `ephemeral[0-23]` form, e.g. ephemeral1
505511

506512
- `volume_type` (string) - The volume type. gp2 & gp3 for General Purpose (SSD) volumes, io1 & io2
507513
for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized HDD,

.web-docs/components/builder/ebs/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,8 +1362,14 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept
13621362
[Throughput](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html)
13631363
for more information
13641364

1365-
- `virtual_name` (string) - The virtual device name. See the documentation on Block Device Mapping
1365+
- `virtual_name` (string) - The virtual device name. See the documentation on
1366+
[Block Device Mapping](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
13661367
for more information.
1368+
1369+
Note: virtual_name only applies for ephemeral (instance) volumes. Any
1370+
EBS-backed volume will have a `snapshot_id` instead.
1371+
1372+
The volume virtual_name should be in the `ephemeral[0-23]` form, e.g. ephemeral1
13671373

13681374
- `volume_type` (string) - The volume type. gp2 & gp3 for General Purpose (SSD) volumes, io1 & io2
13691375
for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized HDD,

.web-docs/components/builder/ebssurrogate/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,8 +1362,14 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept
13621362
[Throughput](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html)
13631363
for more information
13641364

1365-
- `virtual_name` (string) - The virtual device name. See the documentation on Block Device Mapping
1365+
- `virtual_name` (string) - The virtual device name. See the documentation on
1366+
[Block Device Mapping](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
13661367
for more information.
1368+
1369+
Note: virtual_name only applies for ephemeral (instance) volumes. Any
1370+
EBS-backed volume will have a `snapshot_id` instead.
1371+
1372+
The volume virtual_name should be in the `ephemeral[0-23]` form, e.g. ephemeral1
13671373

13681374
- `volume_type` (string) - The volume type. gp2 & gp3 for General Purpose (SSD) volumes, io1 & io2
13691375
for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized HDD,

.web-docs/components/builder/ebsvolume/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,14 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept
392392
[Throughput](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html)
393393
for more information
394394

395-
- `virtual_name` (string) - The virtual device name. See the documentation on Block Device Mapping
395+
- `virtual_name` (string) - The virtual device name. See the documentation on
396+
[Block Device Mapping](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
396397
for more information.
398+
399+
Note: virtual_name only applies for ephemeral (instance) volumes. Any
400+
EBS-backed volume will have a `snapshot_id` instead.
401+
402+
The volume virtual_name should be in the `ephemeral[0-23]` form, e.g. ephemeral1
397403

398404
- `volume_type` (string) - The volume type. gp2 & gp3 for General Purpose (SSD) volumes, io1 & io2
399405
for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized HDD,

.web-docs/components/builder/instance/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,8 +1261,14 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept
12611261
[Throughput](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html)
12621262
for more information
12631263

1264-
- `virtual_name` (string) - The virtual device name. See the documentation on Block Device Mapping
1264+
- `virtual_name` (string) - The virtual device name. See the documentation on
1265+
[Block Device Mapping](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
12651266
for more information.
1267+
1268+
Note: virtual_name only applies for ephemeral (instance) volumes. Any
1269+
EBS-backed volume will have a `snapshot_id` instead.
1270+
1271+
The volume virtual_name should be in the `ephemeral[0-23]` form, e.g. ephemeral1
12661272

12671273
- `volume_type` (string) - The volume type. gp2 & gp3 for General Purpose (SSD) volumes, io1 & io2
12681274
for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized HDD,

builder/common/block_device.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,14 @@ type BlockDevice struct {
9292
// [Throughput](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html)
9393
// for more information
9494
Throughput *int64 `mapstructure:"throughput" required:"false"`
95-
// The virtual device name. See the documentation on Block Device Mapping
95+
// The virtual device name. See the documentation on
96+
// [Block Device Mapping](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
9697
// for more information.
98+
//
99+
// Note: virtual_name only applies for ephemeral (instance) volumes. Any
100+
// EBS-backed volume will have a `snapshot_id` instead.
101+
//
102+
// The volume virtual_name should be in the `ephemeral[0-23]` form, e.g. ephemeral1
97103
VirtualName string `mapstructure:"virtual_name" required:"false"`
98104
// The volume type. gp2 & gp3 for General Purpose (SSD) volumes, io1 & io2
99105
// for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized HDD,

docs-partials/builder/common/BlockDevice-not-required.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@
2828
[Throughput](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html)
2929
for more information
3030

31-
- `virtual_name` (string) - The virtual device name. See the documentation on Block Device Mapping
31+
- `virtual_name` (string) - The virtual device name. See the documentation on
32+
[Block Device Mapping](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
3233
for more information.
34+
35+
Note: virtual_name only applies for ephemeral (instance) volumes. Any
36+
EBS-backed volume will have a `snapshot_id` instead.
37+
38+
The volume virtual_name should be in the `ephemeral[0-23]` form, e.g. ephemeral1
3339

3440
- `volume_type` (string) - The volume type. gp2 & gp3 for General Purpose (SSD) volumes, io1 & io2
3541
for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized HDD,

0 commit comments

Comments
 (0)