github.com/hashicorp/packer@v1.14.3/website/content/partials/packer-plugin-sdk/multistep/commonsteps/HTTPConfig-not-required.mdx (about) 1 <!-- Code generated from the comments of the HTTPConfig struct in multistep/commonsteps/http_config.go; DO NOT EDIT MANUALLY --> 2 3 - `http_directory` (string) - Path to a directory to serve using an HTTP server. The files in this 4 directory will be available over HTTP that will be requestable from the 5 virtual machine. This is useful for hosting kickstart files and so on. 6 By default this is an empty string, which means no HTTP server will be 7 started. The address and port of the HTTP server will be available as 8 variables in `boot_command`. This is covered in more detail below. 9 10 - `http_content` (map[string]string) - Key/Values to serve using an HTTP server. `http_content` works like and 11 conflicts with `http_directory`. The keys represent the paths and the 12 values contents, the keys must start with a slash, ex: `/path/to/file`. 13 `http_content` is useful for hosting kickstart files and so on. By 14 default this is empty, which means no HTTP server will be started. The 15 address and port of the HTTP server will be available as variables in 16 `boot_command`. This is covered in more detail below. 17 Example: 18 ```hcl 19 http_content = { 20 "/a/b" = file("http/b") 21 "/foo/bar" = templatefile("${path.root}/preseed.cfg", { packages = ["nginx"] }) 22 } 23 ``` 24 25 - `http_port_min` (int) - These are the minimum and maximum port to use for the HTTP server 26 started to serve the `http_directory`. Because Packer often runs in 27 parallel, Packer will choose a randomly available port in this range to 28 run the HTTP server. If you want to force the HTTP server to be on one 29 port, make this minimum and maximum port the same. By default the values 30 are `8000` and `9000`, respectively. 31 32 - `http_port_max` (int) - HTTP Port Max 33 34 - `http_bind_address` (string) - This is the bind address for the HTTP server. Defaults to 0.0.0.0 so that 35 it will work with any network interface. 36 37 <!-- End of code generated from the comments of the HTTPConfig struct in multistep/commonsteps/http_config.go; -->