Update website/pages/docs/builders/amazon/ebs.mdx

Co-authored-by: Adrien Delorme <azr@users.noreply.github.com>
This commit is contained in:
Megan Marsh 2020-07-20 17:57:52 -07:00 committed by GitHub
parent 4a8f6c118e
commit faa7bc0dc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 15 deletions

View File

@ -248,27 +248,27 @@ configuration of `launch_block_device_mappings` will expand the root volume
```hcl
source "amazon-ebs" "basic-example" {
region = "us-east-1"
source_ami = "ami-fce3c696"
region = "us-east-1"
source_ami = "ami-fce3c696"
instance_type = "t2.micro"
ssh_username = "ubuntu"
ami_name = "packer_AWS_example_{{timestamp}}"
ssh_username = "ubuntu"
ami_name = "packer_AWS_example_{{timestamp}}"
launch_block_device_mappings {
device_name = "/dev/sda1"
volume_size = 40
volume_type = "gp2"
delete_on_termination = true
}
device_name = "/dev/sda1"
volume_size = 40
volume_type = "gp2"
delete_on_termination = true
}
// 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.
ami_block_device_mappings {
device_name = "/dev/sdb"
virtual_name = "ephemeral0"
}
device_name = "/dev/sdb"
virtual_name = "ephemeral0"
}
ami_block_device_mappings {
device_name = "/dev/sdc"
virtual_name = "ephemeral1"
}
device_name = "/dev/sdc"
virtual_name = "ephemeral1"
}
}
build {