Update website/pages/docs/builders/amazon/ebs.mdx
Co-authored-by: Adrien Delorme <azr@users.noreply.github.com>
This commit is contained in:
parent
4a8f6c118e
commit
faa7bc0dc1
|
@ -248,27 +248,27 @@ configuration of `launch_block_device_mappings` will expand the root volume
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
source "amazon-ebs" "basic-example" {
|
source "amazon-ebs" "basic-example" {
|
||||||
region = "us-east-1"
|
region = "us-east-1"
|
||||||
source_ami = "ami-fce3c696"
|
source_ami = "ami-fce3c696"
|
||||||
instance_type = "t2.micro"
|
instance_type = "t2.micro"
|
||||||
ssh_username = "ubuntu"
|
ssh_username = "ubuntu"
|
||||||
ami_name = "packer_AWS_example_{{timestamp}}"
|
ami_name = "packer_AWS_example_{{timestamp}}"
|
||||||
launch_block_device_mappings {
|
launch_block_device_mappings {
|
||||||
device_name = "/dev/sda1"
|
device_name = "/dev/sda1"
|
||||||
volume_size = 40
|
volume_size = 40
|
||||||
volume_type = "gp2"
|
volume_type = "gp2"
|
||||||
delete_on_termination = true
|
delete_on_termination = true
|
||||||
}
|
}
|
||||||
// Notice that instead of providing a list of mappings, you are just providing
|
// Notice that instead of providing a list of mappings, you are just providing
|
||||||
// multiple mappings in a row. This diverges from the JSON template format.
|
// multiple mappings in a row. This diverges from the JSON template format.
|
||||||
ami_block_device_mappings {
|
ami_block_device_mappings {
|
||||||
device_name = "/dev/sdb"
|
device_name = "/dev/sdb"
|
||||||
virtual_name = "ephemeral0"
|
virtual_name = "ephemeral0"
|
||||||
}
|
}
|
||||||
ami_block_device_mappings {
|
ami_block_device_mappings {
|
||||||
device_name = "/dev/sdc"
|
device_name = "/dev/sdc"
|
||||||
virtual_name = "ephemeral1"
|
virtual_name = "ephemeral1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
build {
|
build {
|
||||||
|
|
Loading…
Reference in New Issue