Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ollevche
Copy link
Member

@ollevche ollevche commented Nov 19, 2024

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

  • I have read the contribution guide.
  • I have not used an AI coding assistant to create this PR.
  • I have written all code in this PR myself OR I have marked all code I have not written myself (including modified code, e.g. copied from other places and then modified) with a comment indicating where it came from.
  • I (and other contributors to this PR) have not looked at the Terraform source code while implementing this PR.

Copy link

Reminder for the PR assignee: If this is a user-visible change, please update the changelog as part of the PR.

Comment on lines +95 to +105
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."
}
```
Copy link
Contributor

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?
Copy link
Contributor

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.

@ollevche ollevche marked this pull request as ready for review November 21, 2024 15:02
@ollevche ollevche requested a review from a team as a code owner November 21, 2024 15:02
@cam72cam cam72cam added the blocked Issues which are blocked by inbound dependencies label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Issues which are blocked by inbound dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants