Remote plugin docs such as Docker now fall under a top level path named
after the provider (e.g https://packer.io/docs/docker/...). This change
adds a redirect for the old URLs to the new location.
* Check if IP address is IPv4 before returning it
Returns the first IPv4 address instead of the first IP address which is an IPv6 for Windows VMs
* Updated the go module
* Reversed the order of checks
First check if it's a loopback and check for ipv4 afterwards
errors
While working on this change it was found that prefixing an error
message with the ErrorPrefix string would trigger a copyOutput function
that would copy any outputted string to Stderr, until a new ErrorPrefix
or Outprefix string is encountered in the output. During background runs of
Packer an error message with the ErrorPrefix was being outputted which
was causing all output, including Stdout, to be written to Stderr.
This change updates the logic to only override the Stdout logging
for non-recoverable errors. The idea being that any non-recoverable
error should bypass panicwrap so that user know an error occurred.
All other errors should follow the same behavior that we had prior to
Packer v1.7.1.
Closes#10855
* HCL2 variables: split validation from getting value, to only
This way we do this only once and log this only once. The errors were being ignored anyways.
* Update types.variables_test.go
This :
* allows to have a `build.dynamic` block
* add tests
* makes sure to show a correct message when a source was not found
* display only name of source (instead of a weird map printout)
* use a "Did you mean %q" feature where possible
Because dynamic blocks need all variables to be evaluated and available, I moved parsing of everything that is not a variable to "after" variables are extrapolated. Meaning that dynamic block get expanded in the `init` phase and then only we start interpreting HCL2 content.
After #10819fix#10657