-
Notifications
You must be signed in to change notification settings - Fork 907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Deprecation of module variables and outputs #2180
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: ollevche <[email protected]>
Reminder for the PR assignee: If this is a user-visible change, please update the changelog as part of the PR. |
Right now, OpenTofu doesn't treat comments as something with a special meaning so this feature would introduce a whole new set | ||
of functionality to be used across the OpenTofu. It would require a separate RFC to define how this notion could potentially | ||
evolve. | ||
|
||
```hcl | ||
# @deprecated: This variable will be removed on 2024-12-31. Use that_is_my_variable instead. | ||
variable "this_is_my_variable" { | ||
type = string | ||
description = "This is a variable for the old way of configuring things." | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this to be a terrible idea, but it may just be having too much exposure to PHP in the past. Comment parsing is always a but tricky and I'm not even sure it's feasible. (Does HCL retain comments after parsing?)
|
||
### Open Questions | ||
|
||
* Do we want to support silencing of deprecation warnings? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should support silencing transient dependencies. This could be done as part of the module{}
block, or we can add it as a tofu-wide option.
Signed-off-by: ollevche <[email protected]>
Signed-off-by: ollevche <[email protected]>
Part of #1005.
In this PR I summarized the discussion around variables and outputs deprecation; provided answers to some of the questions that popped up; and described how to approach this feature technically.
Rendered version.
Target Release
Not applicable
Checklist