Megan Marsh
a6f907c688
tests
2021-03-17 10:48:55 -07:00
Megan Marsh
f12c89bd84
add legacy_isotime function to hcl funcs
2021-03-16 13:33:43 -07:00
Megan Marsh
60c961c021
Merge pull request #10457 from teddylear/feature/recursivefmt-2
...
Adding recursive flag to formatter to format subdirectories
2021-03-15 11:01:01 -07:00
Adrien Delorme
f32b67c3bb
Simplify error message when config file can't be "stat'd" ( #10763 )
...
* remove confusing message when a stat error happens while trying to list HCL2 files
* leave early if our first GetHCL2Files has errors
2021-03-15 14:07:07 +01:00
Adrien Delorme
160d932cce
remove weir "Cannot tell wether " + path + " is a directory" error
2021-03-15 12:04:16 +01:00
Adrien Delorme
e0fe579837
un-remove tests
2021-03-15 12:00:19 +01:00
Adrien Delorme
8ee8420408
simplify return
2021-03-15 11:49:03 +01:00
Adrien Delorme
25ee6a19a6
flatten if a little
2021-03-15 11:48:13 +01:00
Adrien Delorme
a6321ac137
remove debug line
2021-03-15 11:46:07 +01:00
Adrien Delorme
832c0f2b2a
actually run fmt tests and then remove debug statements
2021-03-15 11:41:14 +01:00
teddylear
22d373c279
Adding more debug logic
2021-03-15 11:36:10 +01:00
Adrien Delorme
7d30a5d79d
remove duplicate tests
2021-03-12 11:18:38 +01:00
Adrien Delorme
4e22147909
Merge remote-tracking branch 'origin/master' into pr/teddylear/10457
2021-03-12 10:38:04 +01:00
Adrien Delorme
8208f425c8
addrs: remove Plugin.ForDisplay func, the String one does the job
...
to make things less confusing
2021-02-15 15:32:42 +01:00
Adrien Delorme
429262030f
fix paths for windows !
2021-02-15 14:11:00 +01:00
Adrien Delorme
4487152d1e
cosmetic commit
2021-02-15 14:07:22 +01:00
Adrien Delorme
72e4dc4cb5
update docs to remove 'magic' required_plugin block usages
2021-02-15 13:58:58 +01:00
Adrien Delorme
7809242f41
quote template example
2021-02-15 13:47:40 +01:00
Adrien Delorme
4cb94a67b0
Update types.variables.go
2021-02-15 13:47:40 +01:00
Adrien Delorme
029729225d
tests and fixes
2021-02-15 13:47:39 +01:00
Adrien Delorme
aeecfcd422
show version constrain error in case it's handy
2021-02-15 13:47:39 +01:00
Adrien Delorme
9f545c28fe
required_plugins: prevent using `plugin = "version"`, and show an example
2021-02-15 13:47:39 +01:00
Adrien Delorme
fe12d53e77
addr: remove support for defaulting plugin namespace and host
2021-02-15 13:47:39 +01:00
teddylear
0637601eda
Fixing recursive formatting tests to work on all platforms
2021-02-11 22:08:36 -05:00
Sylvia Moss
774c5903f6
Add error-cleanup-provisioner to HCL2 ( #10604 )
2021-02-11 10:23:15 +01:00
teddylear
d85286e228
Merging in master
2021-02-10 17:44:11 -05:00
Sylvia Moss
1e889078fd
add regex and regexall functions ( #10601 )
2021-02-10 11:58:20 +01:00
Adrien Delorme
ffbb110167
Test running plugins with fake and fresh plugins ( #10595 )
...
* show error as to why plugin discovery failed
* allow to run more manual tests after a plugin installation
* test that a freshly installed external plugin can run
2021-02-09 17:07:59 +01:00
teddylear
d3754e3021
Updating recursive formatter tests to be cleaner and table driven
2021-02-06 18:02:26 -05:00
teddylear
40a97e29db
Clean up recursive format tests to be more accurate
2021-02-06 18:02:26 -05:00
teddylear
93df53a275
Refactor recursive formatting test cases to be table driven
2021-02-06 18:02:26 -05:00
teddylear
261abe0cae
Setting recursive fmt to false, updatting recursive fmt test to validate
...
formatted files
2021-02-06 18:02:26 -05:00
teddylear
ab4b3a8465
Adding recursive flag to formatter to format subdirectories
2021-02-06 18:02:23 -05:00
Megan Marsh
ca123721a6
plugin loading failure should be considered an error so build will not try to run
2021-02-05 11:06:52 -08:00
Sylvia Moss
ef4afafde9
Fix force flag for hcl2 provisioners and post-processors ( #10571 )
2021-02-05 10:57:14 +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
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
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
Sylvia Moss
d1ada744e1
Aws Secrets Manager data sources ( #10505 )
2021-01-22 14:49:45 +01: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
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