Back to Packer

Provisioners overview

website/content/docs/provisioners/index.mdx

1.15.32.2 KB
Original Source

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

[!IMPORTANT]
Documentation Update: Product documentation previously located in /website has moved to the 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. ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

Provisioners overview

Provisioners use built-in and third-party software to install and configure the machine image after booting. Provisioners prepare the system, so you may want to use them for the following use cases:

  • installing packages
  • patching the kernel
  • creating users
  • downloading application code

The following provisioners are included with Packer:

  • breakpoint - pause until the user presses Enter to resume a build.
  • file - upload files to machines image during a build.
  • hcp-sbom - upload an SBOM and associate it with an artifact version in the HCP Packer registry.
  • shell - run shell scripts on the machines image during a build.
  • shell-local - run shell scripts on the host running Packer during a build.
  • powershell - run PowerShell scripts on Windows machine images during a build.
  • windows-shell - run commands using cmd on Windows machine images during a build.
  • windows-restart - initiate a reboot on a Windows machine images during a build.

Additional Community Supported provisioners are developed and maintained by various members of the community.

Refer to the provisioner block documentation to learn more about working with provisioners.