Commit Graph

16934 Commits

Author SHA1 Message Date
Adrien Delorme 429e5149d3 tidy go modules 2021-02-05 14:55:43 +01:00
Adrien Delorme 0c00ef62a5 remove amazon refs from tests 2021-02-05 14:55:33 +01:00
Adrien Delorme 38254bca28 remove aws plugin core implementations 2021-02-05 14:55:21 +01:00
Adrien Delorme fa034ed424 delete cmd/packer-plugin-amazon/main.go 2021-02-05 14:54:44 +01:00
Adrien Delorme 56b4a512ed remove aws datasources 2021-02-05 14:54:16 +01:00
Adrien Delorme 3f7550cad1 remove docker push ecr reference 2021-02-05 14:54:03 +01:00
Adrien Delorme 559c5c040b remove post-processor/amazon-import 2021-02-05 14:53:53 +01:00
Adrien Delorme 26b952e66d docker builder remove aws ref 2021-02-05 14:53:38 +01:00
Adrien Delorme 453e56e554 remove aws builders 2021-02-05 14:52:55 +01:00
Adrien Delorme 692433721d
Add some acceptance testing for Packer init commands (#10566) 2021-02-05 14:06:28 +01:00
Adrien Delorme 0f34592daa
packer init doc clarification (#10558)
* Packer has no state like Terraform has

* init command docs: tell where a plugin will be installed

* docs: add a note that packer init does not work with legacy JSON templates

* docs: add a not that packer init does not install single-plugin binaries

* the plugin getter => packer init

* Update init.mdx

* grammar

* link to how to install plugins manually

* Update website/content/docs/commands/init.mdx

Co-authored-by: Sylvia Moss <moss@hashicorp.com>

* Update website/content/docs/commands/init.mdx

Co-authored-by: Sylvia Moss <moss@hashicorp.com>

Co-authored-by: Sylvia Moss <moss@hashicorp.com>
2021-02-05 13:26:58 +01:00
Megan Marsh ba1ad9ea15
Vsphere example update (#10574)
* fix ubuntu json template example

* add hcl template example

* add hcl alpine example

* add hcl versions of alpine and macos; update macos json

* add hcl version of windows template, call fix on windows json
2021-02-05 13:21:29 +01:00
Sylvia Moss ef4afafde9
Fix force flag for hcl2 provisioners and post-processors (#10571) 2021-02-05 10:57:14 +01:00
Adrien Delorme f588c46fb6
add some docs for the cache dir (#10568) 2021-02-05 10:56:03 +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
Adrien Delorme 92ccd5fa1d
init: show successful installs in cyan (#10557) 2021-02-04 11:11:42 +01:00
Wilken Rivera 8ccd164f25
Update diagnostic detail to display list of PostProcessors (#10564) 2021-02-04 10:56:59 +01: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
Megan Marsh ac014fc1c3
Merge pull request #10542 from MarckK/tags
edit examples of docker tags for post processor hcl syntax to be array of strings
2021-01-29 11:29:46 -08:00
Kara de la Marck 61f03cc137 docs: fix instructions to show docker tags for post processor hcl syntax as array of strings 2021-01-29 18:58:13 +00:00
Megan Marsh 18970bfbe4
Merge pull request #10534 from timblaktu/patch-1
Improve Documentation for Build-level Source Block
2021-01-27 14:01:47 -08:00
Tim Black 300604675b
Improve Documentation for Build-level Source Block
The docs for top-level and build-level source blocks did not make it clear enough, early enough in the page, how packer merges their contents and fails when ambiguities  arise from redefinition. I know the info it there, but it's at the end and I feel that my modification shortens the page overall while putting the most useful info front and center. 

Also, there is simply an error in the note at the end of this page, which further confuses the situation for new readers trying to use HCL and reuse source blocks. It's referring to a non-existent amazon source which is probably a past copy/paste error. 

It took me a day to get re-usable source blocks working, bc I skimmed the page at first (I know slap my wrist), but didn't really grasp what it was saying in the Note at the end, and found it confusing. It wasn't until I found the Issues and PRs related to this feature getting added last April/May that I realized how it was implemented that I started to grasp what this was saying.
2021-01-27 11:12:42 -08:00
Wilken Rivera f36554fa0e
Update redirects and URLs to legacy JSON template docs (#10530) 2021-01-27 09:08:59 -05:00
Miguel Hernández 782cf058b5
Add 'skip_create_ami' option to the amazon-ebs builder (#10531) 2021-01-27 09:00:42 -05:00
Megan Marsh a5a1344948
Merge pull request #10516 from hashicorp/fix_uint8_hcl
fix uint8
2021-01-26 10:22:13 -08:00
Megan Marsh 90fb09e52a linting 2021-01-26 10:09:29 -08:00
Megan Marsh 21df997061 Handle case where list is empty
Co-authored-by: Sylvia Moss <moss@hashicorp.com>
2021-01-26 10:02:16 -08:00
Megan Marsh fbbda0f9d9
Sensitive locals (#10509)
* Allow locals to be delcared as individual blocks, and give them the Sensitive flag

* add docs for new local block

* linting

* add tests

* modified parsing to use schema, check for dupes properly

* update comment

fix wording a liiitle

* add tests for duplicate variables definition in two different files

* remove unnecessary slice initialisation

* fix crash by returning when decode error is hit

* parseLocalVariables: only treat a local vars if its not nil

also return in case of error
return locals in case of error too

* fix duplicate_locals test for windows

Co-authored-by: Adrien Delorme <azr@users.noreply.github.com>
2021-01-26 10:21:44 +01:00
Megan Marsh e3b14d888b create util function in hcl2 template that will load config values into hcl values without panicing if it finds something it cannot handle 2021-01-25 12:25:41 -08:00
Megan Marsh c8d5d56f61 fix 2021-01-25 11:41:42 -08:00
Megan Marsh a8c8d247bb fix uint8 2021-01-25 11:41:42 -08:00
Wilken Rivera ea7fef699f
Test against deployment url (#10501)
* Test against deployment url

* Remove infinite redirect configuration

* Add DEPLOYMENT_URL for builds against master

* website: Update README

* tip on seconds

* Test with GHA timeout_minutes clause

* Add continue on error for poll job

* Add empty url check

* Move to pull-request path filter

* Remove www for packer.io

* Apply suggestions from code review

* Update path filter

Vercel deploys on any change under the website directory.

* Use custom action as test

Co-authored-by: Adrien Delorme <azr@users.noreply.github.com>
2021-01-25 10:28:34 -05:00
Roman Mingazeev e588029d6a
yandex: some fix (#10522) 2021-01-25 12:26:21 +01:00
Megan Marsh c3266cc3b0
remove indexing from cdrom command and let qemu handle it (#10519) 2021-01-25 10:54:41 +01:00
Megan Marsh 37dcf6183c
skip credential validation if we are not exporting an image (#10520) 2021-01-25 10:53:51 +01:00
Megan Marsh 3242b7ee10
read iops and throughput as pointers so we can test for the nil case;… (#10518) 2021-01-25 10:49:37 +01:00
Wilken Rivera 48a31d1b6a
Slight markdown fixes (#10517) 2021-01-25 10:43:41 +01:00
Wilken Rivera 85bb4e7a1e
Merge pull request #10514 from hashicorp/fix_source_ami_docs
remove confusing from_scratch reference which is not relevant in this…
2021-01-22 12:54:28 -05:00
Megan Marsh 3aab42b770 remove confusing from_scratch reference which is not relevant in this config 2021-01-22 09:36:17 -08:00
Sylvia Moss 7d0578c5b7
add DatasourceOutput type to struct-markdown cmd (#10512) 2021-01-22 17:55:32 +01:00
Sylvia Moss d1ada744e1
Aws Secrets Manager data sources (#10505) 2021-01-22 14:49:45 +01:00
Megan Marsh e48a86ffba
Merge pull request #10504 from hashicorp/fix-ansible-docs-links
Update Ansible local links
2021-01-20 16:36:22 -08:00
Wilken Rivera 23b50e5a7a Update ansible local links 2021-01-20 16:21:07 -05:00
Megan Marsh 93008045cd
Merge pull request #10500 from hashicorp/format_stdin
enable Packer fmt to read from stdin
2021-01-20 11:47:55 -08:00
Megan Marsh 2b0996daa6 dont print filename if its reading from stdin 2021-01-20 11:30:50 -08: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
Megan Marsh 40df74e95a linting 2021-01-19 15:34:18 -08:00
Megan Marsh 4323b49130 enable Packer fmt to read from stdin 2021-01-19 15:30:34 -08:00