more additions to partials

This commit is contained in:
Megan Marsh 2020-07-17 15:52:11 -07:00
parent f245ff4e34
commit 530f5e3f63
5 changed files with 93 additions and 18 deletions

View File

@ -21,12 +21,32 @@ import (
// The following mapping will tell Packer to encrypt the root volume of the // The following mapping will tell Packer to encrypt the root volume of the
// build instance at launch using a specific non-default kms key: // build instance at launch using a specific non-default kms key:
// //
// <Tabs>
// <Tab heading="JSON">
//
// ```json // ```json
// [{ // ami_block_device_mappings: [
// {
// "device_name": "/dev/sda1", // "device_name": "/dev/sda1",
// "encrypted": true, // "encrypted": true,
// "kms_key_id": "1a2b3c4d-5e6f-1a2b-3c4d-5e6f1a2b3c4d" // "kms_key_id": "1a2b3c4d-5e6f-1a2b-3c4d-5e6f1a2b3c4d"
// }] // }
// ]
// ```
//
// </Tab>
// <Tab heading="HCL2">
//
// ```hcl
// ami_block_device_mappings {
// device_name = "/dev/sda1"
// encrypted = true
// kms_key_id = "1a2b3c4d-5e6f-1a2b-3c4d-5e6f1a2b3c4d"
// }
// ```
//
// </Tab>
// </Tabs>
// ``` // ```
// //
// Documentation for Block Devices Mappings can be found here: // Documentation for Block Devices Mappings can be found here:

View File

@ -49,14 +49,32 @@ type Config struct {
// If you end up in this situation, you can use the template option // If you end up in this situation, you can use the template option
// `pause_before_connecting`. By default, there is no pause. For example: // `pause_before_connecting`. By default, there is no pause. For example:
// //
// <Tabs>
// <Tab heading="JSON">
//
// ```json // ```json
// { // "builders" [{
// ...
// "communicator": "ssh", // "communicator": "ssh",
// "ssh_username": "myuser", // "ssh_username": "myuser",
// "pause_before_connecting": "10m" // "pause_before_connecting": "10m"
// }]
// ```
//
// </Tab>
// <Tab heading="HCL2">
//
// ```hcl
// source "amazon-ebs" "example" {
// communicator = "ssh"
// ssh_username = "myuser"
// pause_before_connecting = "10m"
// } // }
// ``` // ```
// //
// </Tab>
// </Tabs>
//
// In this example, Packer will check whether it can connect, as normal. But once // In this example, Packer will check whether it can connect, as normal. But once
// a connection attempt is successful, it will disconnect and then wait 10 minutes // a connection attempt is successful, it will disconnect and then wait 10 minutes
// before connecting to the guest and beginning provisioning. // before connecting to the guest and beginning provisioning.

View File

@ -71,7 +71,6 @@
"ttl": "3600s" "ttl": "3600s"
} }
} }
```
</Tab> </Tab>
<Tab heading="HCL2"> <Tab heading="HCL2">

View File

@ -8,12 +8,32 @@ Example use case:
The following mapping will tell Packer to encrypt the root volume of the The following mapping will tell Packer to encrypt the root volume of the
build instance at launch using a specific non-default kms key: build instance at launch using a specific non-default kms key:
<Tabs>
<Tab heading="JSON">
```json ```json
[{ ami_block_device_mappings: [
{
"device_name": "/dev/sda1", "device_name": "/dev/sda1",
"encrypted": true, "encrypted": true,
"kms_key_id": "1a2b3c4d-5e6f-1a2b-3c4d-5e6f1a2b3c4d" "kms_key_id": "1a2b3c4d-5e6f-1a2b-3c4d-5e6f1a2b3c4d"
}] }
]
```
</Tab>
<Tab heading="HCL2">
```hcl
ami_block_device_mappings {
device_name = "/dev/sda1"
encrypted = true
kms_key_id = "1a2b3c4d-5e6f-1a2b-3c4d-5e6f1a2b3c4d"
}
```
</Tab>
</Tabs>
``` ```
Documentation for Block Devices Mappings can be found here: Documentation for Block Devices Mappings can be found here:

View File

@ -22,14 +22,32 @@
If you end up in this situation, you can use the template option If you end up in this situation, you can use the template option
`pause_before_connecting`. By default, there is no pause. For example: `pause_before_connecting`. By default, there is no pause. For example:
<Tabs>
<Tab heading="JSON">
```json ```json
{ "builders" [{
...
"communicator": "ssh", "communicator": "ssh",
"ssh_username": "myuser", "ssh_username": "myuser",
"pause_before_connecting": "10m" "pause_before_connecting": "10m"
}]
```
</Tab>
<Tab heading="HCL2">
```hcl
source "amazon-ebs" "example" {
communicator = "ssh"
ssh_username = "myuser"
pause_before_connecting = "10m"
} }
``` ```
</Tab>
</Tabs>
In this example, Packer will check whether it can connect, as normal. But once In this example, Packer will check whether it can connect, as normal. But once
a connection attempt is successful, it will disconnect and then wait 10 minutes a connection attempt is successful, it will disconnect and then wait 10 minutes
before connecting to the guest and beginning provisioning. before connecting to the guest and beginning provisioning.