Commit Graph
24 Commits
Author SHA1 Message Date
Tanmay Jain 0e8668eb5f BUG: Fixed Packer Console's UseSequentialEval flag 2025-03-11 16:52:48 -04:00
Lucas Bajolet cd74430e0c command: add use-sequential options for commands
For all the commands that call Initialise, we introduce a new flag:
UseSequential.

This disables DAG scheduling for evaluating datasources and locals as a
fallback to the newly introduced DAG scheduling approach.

`hcl2_upgrade` is a special case here, as the template is always JSON,
there cannot be any datasource, so the DAG in this case becomes
meaningless, and is not integrated in this code path.
2024-10-29 16:10:29 -04:00
Lucas Bajolet 020f18e37f command: remove unused FlagSetFlags enum
The enumeration for FlagSetFlags, which presumably was added when the
Meta structure was introduced, aims to pre-populate the flagset for a
subcommand with a series of arguments.

However, despite it being documented, it is actually not used, and
therefore can safely be removed from the codebase.
2023-10-16 09:51:53 -04:00
hashicorp-copywrite[bot] 19055df3ec [COMPLIANCE] License changes (#12568)
* 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>
2023-08-10 15:53:29 -07:00
Wilken Rivera e0a5286645 cmd/console: Add config-type flag to command help (#12360)
It is not clear that the console command runs in legacy JSON mode by
default and that users can specify the -config-type flag to toggle HCL2
mode. This change adds the config-type flag to the command's help text
to alert users of the gotcha.

In the next minor Packer release the console command will be updated to
default to HCL2 mode.

Relates to: #12359
Relates to: #10603
2023-04-12 14:27:39 -04:00
hashicorp-copywrite[bot] b7df3ca36f [COMPLIANCE] Add Copyright and License Headers (#12254)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2023-03-02 15:37:05 -05:00
Sylvia Moss 291121dd55 (2) Implement datasources (#10440) 2021-01-20 10:37:16 +01:00
Tristan Watson 17c806fbf5 Removing obsolete packer HCL warnings from CLI for validate and command (#10461) 2021-01-11 11:50:23 +01:00
Megan Marsh 00cc425b84 docs tweaks 2020-10-14 12:58:04 -07:00
Adrien Delorme efd69aea2a console: allow to use console when there are untyped vars (#9864)
* the var will simply be "unknown"
* add a test
2020-09-02 17:19:56 +02:00
Adrien Delorme 44616d3bff refactor initialization out from packer configs + tests (#9627)
The initialization of packer core in JSON also validates that `null` variables were set, except in the case of `packer validate --syntax-only` , but after the refactor to allow to have all commands work with HCL2 and JSON this subtlety was lost.

This refactors the initialisation of the core in order to allow to have `packer validate --syntax-only` not error in case a variable is not set. Since these calls are refactored this works for HCL2 too.

fix #9478
2020-07-24 10:58:03 +02:00
Adrien Delorme bac9c74447 packer console for HCL2 (#9359) 2020-06-05 17:23:54 +02:00
Adrien Delorme 2f26168adc ConsoleCommand.ParseArgs: don't fail if no buildfile was passed 2020-05-14 12:21:42 +02:00
Adrien Delorme 14f18f4236 dont catch signals in console, as it seems unecessary for now 2020-05-12 11:29:09 +02:00
Adrien Delorme 22a36ef97a Move vars from Meta to cla args; this forces us to use it in GetConfigFromJSON which in turn forces us into updating console and validate 2020-05-12 11:24:22 +02:00
Megan Marsh 217dcbb97f golang 1.14 doesn't like calling NewFile on existing files. Port solution over from Terraform 2020-04-09 14:38:17 -07:00
Adrien Delorme d2964d59e9 document that the -var-file option still expects JSON files for now 2020-03-03 17:19:51 +01:00
Guido Dobboletta e79d62d006 Fix text 2019-08-08 13:22:59 -05:00
Megan Marsh f7bf80724c document what a REPL is 2019-06-10 11:39:42 -07:00
Megan MarshandAdrien Delorme 53a5e90d78 Update command/console.go
Co-Authored-By: Adrien Delorme <[email protected]>
2019-06-10 11:38:29 -07:00
Megan MarshandAdrien Delorme 7cce3157a8 Update command/console.go
Co-Authored-By: Adrien Delorme <[email protected]>
2019-06-10 11:38:14 -07:00
Megan Marsh 668e92f2ca add docs and the option to list variables from inside the console 2019-06-06 14:26:12 -07:00
Megan Marsh df916e805e borrow wrappedreadline workarounds from terraform and implement a similar check for piped commands; this makes the cli experience much cleaner 2019-06-06 13:26:07 -07:00
Megan Marsh b8ac1a800d implement a packer console analogous to the terraform console 2019-06-05 16:35:22 -07:00