Skip to content

Allow comments in .terraform-version file #347

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

Closed
wants to merge 3 commits into from

Conversation

OJFord
Copy link
Contributor

@OJFord OJFord commented Jul 15, 2022

Using syntax:

# this whole line is a comment
1.2.3
# this is also a comment

but not inline comments.

Closes #283

@jgrumboe
Copy link

jgrumboe commented Aug 24, 2022

Hi @OJFord
I would vote against comments as there are probably also other tools relying on this file in the existing format.
And there’s also an open issue at the setup-terraform action which could also rely on the file.
hashicorp/setup-terraform#208

Additionally, I checked .ruby-version and .node-version and both also don't support comments as that supports the simple "cat" use case like rbenv use $(cat .ruby-version) for example.

@mputilin
Copy link

mputilin commented Nov 8, 2022

Useful feature. Please merge.

OJFord added 2 commits August 6, 2023 20:36
Using syntax:

    # this whole line is a comment
    1.2.3
    # this is also a comment

but not inline comments.

Closes tfutils#283
@OJFord OJFord force-pushed the impl-283 branch 4 times, most recently from 45c4370 to 5277b7e Compare August 6, 2023 20:09
@Zordrak
Copy link
Collaborator

Zordrak commented Jul 4, 2025

It does seem that the general consensus, especially in a wider community sense, with different tools consolidating on common configuration files, that while this might sometimes be handy, it's likely to be more troublesome than the minor value it would add.

@Zordrak Zordrak closed this Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Ignore comments in .terraform-version
4 participants