212 Commits

Author SHA1 Message Date
Wilken Rivera
6f23bc0d97 Vendor exoscale-import plugin
This change will vendor the new version of the exoscale-import
post-processor component, but remove all of its code from Packer. After
the v1.8.0 release this change should be removed entirely.

This vendor process is being used as a workaround for decoupling the
exoscale-import component without causing a breaking change in Packer.

Users of Exoscale are encouraged to leverage `packer init` for
installing the latest version of packer-plugin-exoscale.
2021-03-09 10:02:30 -05:00
Marc Falzon
9a1f2d0c97 fixup! Remove "exoscale-import" post-processor 2021-03-09 10:01:38 -05:00
Wilken Rivera
79481ed7ec Add vendored components map as opposed to removing code generation for command/plugin.go 2021-03-05 15:44:04 -05:00
Megan Marsh
a5b0e37d7e docker extraction POC 2021-03-05 15:33:34 -05:00
Blake Garner
0b1829ef88
Update to gopsutil v3.21.1 to allow builds to work for darwin arm64 (#10697)
* Update to v3.21.1 to allow builds to work for darwin arm64

Co-authored-by: Megan Marsh <megan@hashicorp.com>
Co-authored-by: Adrien Delorme <adrien.delorme@icloud.com>
2021-03-02 12:13:59 +01:00
Megan Marsh
9a11fd4136
Update amazon sdk (#10668) 2021-02-22 11:18:48 +01:00
Megan Marsh
3d55fa51d8
Merge pull request #10560 from trown/bump-oci-go-sdk
Update Oracle Go SDK
2021-02-18 11:46:02 -08:00
Adrien Delorme
993ae765e5
Prepare release (#10646)
* get github.com/hashicorp/packer-plugin-sdk@v0.0.14

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md
2021-02-17 11:22:08 +01:00
Adrien Delorme
915372c73d
get packer plugin sdk version 0.0.12 (#10612) 2021-02-11 14:14:04 +01:00
mflorin
9afaa5a21f
Profitbricks builder fixes (#10549) 2021-02-09 16:56:06 +01:00
Adrien Delorme
1075120109
use the SDK version 0.0.11 (#10572) 2021-02-04 17:52:40 +01:00
Sylvia Moss
3ddb17ad86
Don't allow data sources to be used inside data sources (#10559) 2021-02-04 11:25:44 +01:00
John Trowbridge
34b86c0228 Update Oracle Go SDK
Currently, the oracle-oci builder is broken, because it is unable
to read the key file provide by Oracle cloud. Updating to the
latest oci-go-sdk fixes the issue.
2021-02-03 10:44:12 -05:00
Adrien Delorme
ed091163be
HCL2 Parse packer.required_plugins block + packer init (#10304)
This adds the new `required_plugins` block to be nested under the packer block.

Example:
```hcl
packer {
  required_plugins {
    aws = {
      version = ">= 2.7.0"
      source = "azr/aws"
    }
    azure = ">= 2.7.0"
  }
}
```

For example on darwin_amd64 Packer will install those under :
* "${PACKER_HOME_DIR}/plugin/github.com/azr/amazon/packer-plugin-amazon_2.7.0_x5.0_darwin_amd64"
* "${PACKER_HOME_DIR}/plugin/github.com/hashicorp/azure/packer-plugin-azure_2.7.0_x5.0_darwin_amd64_x5"

+ docs
+ tests
2021-02-02 18:05:04 +01:00
Sylvia Moss
d1ada744e1
Aws Secrets Manager data sources (#10505) 2021-01-22 14:49:45 +01:00
Sylvia Moss
291121dd55
(2) Implement datasources (#10440) 2021-01-20 10:37:16 +01:00
Adrien Delorme
52d2d7fe5f
Copy MapOf... plugin types back into Packer core (#10466)
* move maps of plugins back in core

* go mod vendor

* more fixes

* fix imports

* Update core_test.go

* fix build

* more fixes

* more fixes

* up vendors after fixing sdk

* Update post_processor_mock.hcl2spec.go

* Leave implementatino of MapOf in the sdk for plugi tests

Other wise use the interface

* go mod tidy

* add MapOfDatasource type too
2021-01-13 12:14:06 +01:00
Megan Marsh
da0ee96cdd fix imports 2021-01-07 15:38:46 -08:00
Megan Marsh
c94d66db13 clean up dependencies 2021-01-07 13:03:20 -08:00
Megan Marsh
82eb22c8bb go.mod updates 2020-12-17 14:55:14 -08:00
Mike Tougeron
e0e82e2192
Support AWS gp3 volumes (#10338)
* Support AWS gp3 volumes
* docs
* tests
2020-12-09 13:06:57 +01:00
Megan Marsh
863e20ad65 move builder/testing framework into sdk; it imports the core but I think we just need to accept that. It doesn't expose the core directly to the SDK. 2020-12-02 09:46:42 -08:00
Megan Marsh
edbd483917 fix go-getter imports 2020-12-01 10:59:08 -08:00
Megan Marsh
e04eaa89e6 move steps and step configs from packer/common to packer/common/commonsteps 2020-11-13 11:15:04 -08:00
Adrien Delorme
8e355d0fe7 Move ssm code to its own ssm package and make it singlethreaded 2020-10-29 11:57:29 +01:00
Roman Mingazeev
ae7fc84557 Added support for IAM credential in the token field and YC_TOKEN env 2020-10-23 11:47:28 +03:00
Megan Marsh
456214eb51
Merge pull request #10056 from marinsalinas/new_client
New official Outscale SDK migration.
2020-10-16 15:28:54 -07:00
Adrien Delorme
14e253f316
upgrade panicwrap to v1 (#10059)
* and go mod tidy this allows us to get rid of a dep
2020-10-07 11:22:32 -04:00
Patrik
d4d78feed2
feat(scaleway): get image by label if not an UUID (#10061)
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-10-07 16:04:00 +02:00
upodroid
1c4b8c3d31 fmt fix 2020-10-01 23:24:46 +01:00
upodroid
b1c74f9df0 Merge branch 'master' of github.com:hashicorp/packer into google-impersonation 2020-10-01 23:19:15 +01:00
Adrien Delorme
f3e65b5eb1 use "github.com/hashicorp/go-cty-funcs/collection".CoalesceFunc
fix #9419
after https://github.com/hashicorp/go-cty-funcs/pull/5 was merged
2020-09-30 11:59:36 +02:00
Megan Marsh
4c0ac6917e switch to using aws base config, which means we're using code tested and maitnained by the terraform crowd. 2020-09-29 14:26:38 -07:00
Megan Marsh
09cdc4275b
Merge pull request #9974 from hashicorp/fix_9786
Switch to explicitly declaring TrackProgress on UI, using an underlyi…
2020-09-24 11:04:23 -07:00
Megan Marsh
429d431365 Implement assume_role for Packer. This functionality is copied shamelessly
from the Terraform AWS provider
2020-09-23 13:18:26 -07:00
Megan Marsh
7b1826e107 tidy go modules 2020-09-23 11:17:30 -07:00
Megan Marsh
ae8d359bf1 Switch to explicitly declaring TrackProgress on UI, using an underlying progress bar specifically stored on the struct. Export UiProgressTracker. These changes allow us to optionaly switch to the NoopProgressTracker when no TTY is set. 2020-09-21 16:05:14 -07:00
upodroid
be56632f7e fix vendoring 2020-09-20 16:50:03 +01:00
Upo
3f6230470b
Merge branch 'master' into google-impersonation 2020-09-20 15:23:04 +01:00
upodroid
2faacfd5d7 add service account impersonation 2020-09-20 15:18:37 +01:00
Sylvia Moss
7736ae6c67
Add VMware vnc_over_websocket option (#9938) 2020-09-16 11:02:46 +02:00
Patrik
f8e31bff12
feat(builder): bump scaleway to new sdk (#9902) 2020-09-09 10:27:48 +02:00
Megan Marsh
d2dd158fe2 Implement cd_files option. The Addfile code is modified from the floppy_files
tooling. Tested on OSX, `Windows, and Linux. Documented command line dependencies.
Added acceptance tests (behind testacc flag, since there are dependencies).
This option is only implemented for the vmware and hyperv iso builders. It will be
implemented for others in later PRs in order to make review easier.
2020-09-04 12:20:19 -07:00
Adrien Delorme
5ba134ac5b
JSON to HCL2 (minimal best-effort) transpiler (#9659)
hcl2_upgrade transforms a JSON build-file in a HCL2 build-file.
This starts a validated Packer core and from that core we generate an HCL 'block' per plugin/configuration. So for a builder, a provisioner, a post-processor or a variable. The contents of each block is just transformed as is and basically all fields are HCL2-ified.
A generated field can be valid in JSON but invalid on HCL2; for example JSON templating (in mapstructure) allows to set arrays of strings - like `x = ["a", "b"]` - with single strings - like `x="a"` -, HCL does not allow this.
Since JSON does not make the distinction between variables and locals, everything will be a variable. So variables that use other variables will not work.
hcl2_upgrade tries to transform go templating interpolation calls to HCL2 calls when possible, leaving the go templating calls like they are in case it cannot.

Work:
* transpiler
* tests
* update hcl v2 library so that output looks great.
* update docs
2020-08-25 10:51:43 +02:00
Adrien Delorme
fbfe31ceaf
update flock + go mod tidy (#9805) 2020-08-24 10:49:43 +02:00
Sylvia Moss
a1524bf96a
Add option to also import OVF templates to the Content Library (#9755) 2020-08-19 13:20:25 +02:00
Marin Salinas
daefa4d086 chore: update vendor dependencies 2020-08-18 13:33:45 -05:00
Megan Marsh
321aa090df
Merge pull request #9746 from jsmcnair/f-vault-function
Add vault function for HCL2 and documentation
2020-08-13 07:18:28 -07:00
Chris Gilmer
04f952a2f4
Pretty print build durations 2020-08-11 15:04:42 -07:00
jsmcnair
33e3f62ff7 Add vault function for HCL2 and document 2020-08-11 09:18:15 +01:00