|
|
|
|
@ -106,11 +106,12 @@ Block devices can be nested in the
|
|
|
|
|
|
|
|
|
|
## Basic Example
|
|
|
|
|
|
|
|
|
|
<Tabs>
|
|
|
|
|
<Tab heading="JSON">
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"type": "amazon-ebsvolume",
|
|
|
|
|
"secret_key": "YOUR SECRET KEY HERE",
|
|
|
|
|
"access_key": "YOUR KEY HERE",
|
|
|
|
|
"region": "us-east-1",
|
|
|
|
|
"ssh_username": "ubuntu",
|
|
|
|
|
"instance_type": "t2.medium",
|
|
|
|
|
@ -150,6 +151,58 @@ Block devices can be nested in the
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</Tab>
|
|
|
|
|
<Tab heading="HCL2">
|
|
|
|
|
|
|
|
|
|
```hcl
|
|
|
|
|
source "amazon-ebsvolume" "basic-example" {
|
|
|
|
|
region = "us-east-1"
|
|
|
|
|
ssh_username = "ubuntu"
|
|
|
|
|
instance_type = "t2.medium"
|
|
|
|
|
source_ami = "ami-40d28157"
|
|
|
|
|
|
|
|
|
|
ebs_volumes {
|
|
|
|
|
volume_type = "gp2"
|
|
|
|
|
device_name = "/dev/xvdf"
|
|
|
|
|
delete_on_termination = false
|
|
|
|
|
tags = {
|
|
|
|
|
zpool = "data"
|
|
|
|
|
Name = "Data1"
|
|
|
|
|
}
|
|
|
|
|
volume_size = 10
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ebs_volumes {
|
|
|
|
|
volume_type = "gp2"
|
|
|
|
|
device_name = "/dev/xvdg"
|
|
|
|
|
tags = {
|
|
|
|
|
zpool = "data"
|
|
|
|
|
Name = "Data2"
|
|
|
|
|
}
|
|
|
|
|
delete_on_termination = false
|
|
|
|
|
volume_size = 10
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ebs_volumes {
|
|
|
|
|
volume_size = 10
|
|
|
|
|
tags = {
|
|
|
|
|
zpool = "data"
|
|
|
|
|
Name = "Data3"
|
|
|
|
|
}
|
|
|
|
|
delete_on_termination = false
|
|
|
|
|
device_name = "/dev/xvdh"
|
|
|
|
|
volume_type = "gp2"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
build {
|
|
|
|
|
sources = ["sources.amazon-ebsvolume.basic-example"]
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</Tab>
|
|
|
|
|
</Tabs>
|
|
|
|
|
|
|
|
|
|
-> **Note:** Packer can also read the access key and secret access key from
|
|
|
|
|
environmental variables. See the configuration reference in the section above
|
|
|
|
|
for more information on what environmental variables Packer will look for.
|
|
|
|
|
|