Commit graph

12 commits

Author SHA1 Message Date
Wilken Rivera
d6a5234412 Unregister packer-image-iteration datasource
This change temporarily renames the type of the packer-image-iteration
datasource to prevent it from being automatically registered by the
Packer plugin tooling. The datasource is fully functional, but not quite
ready for full usage. It will be updated in a future release.
2021-09-14 14:25:48 -04:00
Wilken Rivera
b10df3abb7
Update HCP Packer registry image extraction, validation, publishing logic for registry capable plugins (#11221)
* Update handling of registry artifacts

This change uses the github.com/hashicorp/packer-plgin-sdk/packer/registryimage for querying
Artifact State for HCP Registry Image metadata. To handle the conversion
of the RPC response, mapstructure was introduced to conversion state
data into an registryimage.Image before publishing to a image bucket.

* Update to use registry image from packersdk

* Rename internal registry service pkg

* Update vendored plugins to latest version

* The latest release of Amazon, GoogleCompute, and Azure have support
  for publishing images to the HCP Packer registry.
2021-09-13 21:07:54 -04:00
Wilken Rivera
7aa6b699ab
Add environment variable precheck for datasource acceptance tests (#11254)
Before change
```
=== Failed
=== FAIL: datasource/hcp-packer-iteration TestAccDatasource_HCPPackerIteration (1.97s)
    pluginacc.go:143: Error running plugin acceptance tests: Bad exit code. Logfile: packer_log_hcp_packer_iteration_datasource_basic_test.txt
        Logs can be found at /Users/wilkenrivera/Development/packer/datasource/hcp-packer-iteration/packer_log_hcp_packer_iteration_datasource_basic_test.txt
        and the acceptance test template can be found at /Users/wilkenrivera/Development/packer/datasource/hcp-packer-iteration/hcp_packer_iteration_datasource_basic_test.pkr.hcl

DONE 690 tests, 5 skipped, 1 failure in 387.912s
```

After change
```
=== SKIP: datasource/hcp-packer-iteration TestAccDatasource_HCPPackerIteration (0.00s)
    data_acc_test.go:35: Acceptance tests skipped unless envs "HCP_CLIENT_ID" and "HCP_CLIENT_SECRET" are set
```
2021-09-08 12:16:33 +02:00
Megan Marsh
48de1fc7da allow datasources to use other datasources
create a null data source for testing. We can choose to document if we want to, but it's a convenience for us

add a test to catch cyclic datasource dependency, update tests to include out of order data sources, and update the code to clean up the returned diagnostics generated from the recursive evaluation

PR review comments
2021-09-03 16:10:39 -07:00
Megan Marsh
fd80f8da8c Add two new data sources -- hcp-packer-iteration and hcp-packer-image. These data sources together will allow users to query hcp_packer for the image_ids they need to use as source images to their builds, with a simple UI and clear outputs.
add quick and dirty acceptance test for hcp packer image iteration and hcp packer image data sources
PR review
linting
2021-09-03 15:51:09 -07:00
Megan Marsh
60b734733b reworked docs, and created docs page. Not adding to the website index because we don't want this doc page live until after the HCP Packer registry enters public beta 2021-08-30 16:27:08 -07:00
Megan Marsh
c0eb830c42 better docstrings and regenerate docs 2021-08-30 15:53:29 -07:00
Megan Marsh
980deeb684 Implement hcp packer data source. This is a rough copy of the terraform provider's data source, to make beta user experience consistent across both sources 2021-08-27 12:03:55 -07:00
Sylvia Moss
505cbd2591
Vendor amazon plugin (#10800)
* remove amazon from core
* vendor amazon plugin
* remove website content
* Add amazon to docs-remote-plugins
* update amazon reference links in the documentation
* update amazon docs version to latest

Co-authored-by: Adrien Delorme <adrien.delorme@icloud.com>
2021-03-25 13:37:48 +01:00
Sylvia Moss
d1ada744e1
Aws Secrets Manager data sources (#10505) 2021-01-22 14:49:45 +01:00
Sylvia Moss
3c7944624a
(3) Add amazon-ami data source (#10467) 2021-01-20 11:05:03 +01:00
Sylvia Moss
291121dd55
(2) Implement datasources (#10440) 2021-01-20 10:37:16 +01:00