packer/website/content/docs/builders/null.mdx

59 lines
1.7 KiB
Text
Raw Permalink Normal View History

---
2017-06-14 21:04:16 -04:00
description: |
The `null` builder creates an SSH connection and runs provisioners. Use the `null` builder to debug provisioners without incurring long wait times.
page_title: null builder reference
---
2025-11-19 17:24:25 -05:00
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
> [!IMPORTANT]
> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com.
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
<BadgesHeader>
<PluginBadge type="official" />
</BadgesHeader>
# `null` builder
The `null` builder sets up an SSH connection and runs provisioners. You can use it to debug provisioners without incurring long wait times. It does not create a images or artifacts.
## Basic Example
2015-07-22 22:31:00 -04:00
Below is a fully functioning example. It doesn't do anything useful, since no
provisioners are defined, but it will connect to the specified host via ssh.
2020-06-16 11:44:41 -04:00
<Tabs>
<Tab heading="HCL2">
```hcl
source "null" "basic-example" {
ssh_host = "127.0.0.1"
ssh_username = "foo"
ssh_password = "bar"
}
build {
sources = ["sources.null.basic-example"]
}
```
2024-12-19 21:12:49 -05:00
</Tab>
<Tab heading="JSON">
```json
{
"type": "null",
"ssh_host": "127.0.0.1",
"ssh_username": "foo",
"ssh_password": "bar"
}
```
2020-06-16 11:44:41 -04:00
</Tab>
</Tabs>
## Configuration Reference
The null builder has no configuration parameters other than the
[communicator](/packer/docs/templates/legacy_json_templates/communicator) settings.