* WIP Testing Approach
* WIP Testing Approach
* WIP Testing Approach Work
* WIP Testing Approach
* adding acceptance test for windows Amazon EBS.
* modify wrapper string to use Set-Variable
* fixing unit tests
* cleanup
* updated approach to use -file instead of inline powershell execution.
* adding more scenarios for acceptance test.
* using writeString for file directly.
* changing variable name
* updating test case. cleanup.
* updating test case
* updating test case
* updating test case - nested try catch
* adding unit test for None Execution Policy
* adding unit test for None Execution Policy
* fix test case
Since the enumer implementation we used hadn't been updated for 5+
years, this didn't work with recent linux/go versions, and enumer
crashed while attempting to parse/analyse the source files.
There's another alternative on Github, forked from the one we used,
which seems more maintained now, and does produce the expected files in
Packer.
* Updating the license from MPL to Business Source License
Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at https://hashi.co/bsl-blog, FAQ at https://hashi.co/license-faq, and details of the license at www.hashicorp.com/bsl.
* Update copyright file headers to BUSL-1.1
---------
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
* provisioner/shell: add support for Env variables
As mentioned in issue #11670, the Shell provider did not support Env
variable declarations in the HCL templates.
This commit adds the capability to the code.
* provisioner/powershell: add support for Env vars
* provisioner/windows-shell: support Env variables
* allowing to set shell env vars from a key/value map.
* tests
This new map will work alongside the `environment_vars` but it allows using a
datasource value seamlessly. At validation, and because `environment_vars` was
an array of strings containing `KEY=value`, using datsources would not work,
because these values are not known yet and would evaluate to `<unknown>`. With
this, the value and the key can be unknown and will validate correctly for
datasources.
* start using `go:generate packer-sdc struct-markdown`
* Update Makefile
remove @go install ./cmd/struct-markdown
* run go generate for struct-markdown
* use //go:generate packer-sdc mapstructure-to-hcl2
* run go generate for mapstructure-to-hcl2
* remove struct-markdown and mapstructure-to-hcl2
* vendor vendors
This reverts commit 334f399ee3, reversing
changes made to 45a5d28bad.
When testing against Windows SSH the Powershell script fails to parse
the newly added if statement.