mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-19 17:59:05 -05:00
Rename the CLI arg for deprecation outputs/variables (#2774)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
This commit is contained in:
@@ -95,8 +95,12 @@ Silencing deprecation warnings could be presented in two different ways: globall
|
||||
basis. This setting shouldn't be a part of a module call block since there could be multiple calls for the same module and each such
|
||||
call should either produce or silence the warnings.
|
||||
|
||||
In this RFC I suggest to allow users to control module deprecation warnings via a CLI flag: `deprecation-warns`, which may
|
||||
have the following values: `all` (default) or `local` (raise deprecation warnings only from module calls inside the local modules).
|
||||
In this RFC I suggest to allow users to control module deprecation warnings via a CLI flag: `deprecation`, which may
|
||||
have the following values:
|
||||
* `module:all` (default) - shows all the deprecation warnings from local and remote module calls.
|
||||
* `module:local` - raise deprecation warnings only from module calls inside the local modules.
|
||||
* `module:none` - is silencing all the warnings regarding deprecated outputs/variables.
|
||||
|
||||
This could be extended later to include other options such as `none` to disable the deprecation warnings altogether.
|
||||
|
||||
### Technical Approach
|
||||
@@ -123,7 +127,7 @@ presence.
|
||||
|
||||
We would need to extend module output nodes to also mark values as deprecated if the user specified so. Then, the mark should
|
||||
be checked where `tofu.EvalContext` is used to evaluate expressions and blocks (i.e. `EvalContext.EvaluateBlock` and
|
||||
`EvalContext.EvaluateExpr`). The deprecation mark check must take into account the value of `deprecation-warns` flag
|
||||
`EvalContext.EvaluateExpr`). The deprecation mark check must take into account the value of `deprecation` flag
|
||||
and also it shouldn't fire if the value is used inside the module, which marked this value as deprecated.
|
||||
|
||||
This approach would also allow us to reuse the implementation, if we want to mark more values as deprecated from different
|
||||
|
||||
Reference in New Issue
Block a user