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

[Question] Why do we have to provide the --tf-version to the generate command? #323

Closed
andreaangiolillo opened this issue Jan 12, 2024 · 2 comments · Fixed by #324
Closed
Labels
documentation Improvements or additions to documentation

Comments

@andreaangiolillo
Copy link

I'd like to understand the impact of using an older version of Terraform for the generate command. It would be great if you could update your README to clarify this matter. Thanks!

@austinvalle
Copy link
Member

Hey there @andreaangiolillo 👋🏻 , the --tf-version is not required and if not provided will either:

  • Use the Terraform binary found in your environment (i.e.PATH env var)
  • Download the latest Terraform binary from releases.hashicorp.com

The terraform binary is used to run the two commands terraform init and then terraform providers schema, which the latter command provides the schema information that we build the markdown documentation with.

So the general answer to your question is that only changes to the JSON output of the command terraform providers schema will affect the documentation generator. We typically only make backwards-compatible changes to the provider schema, so using earlier versions of Terraform (needs to be at least 0.12) will likely be fine. I'd recommend using the latest version of Terraform that your provider supports (which hopefully, should just be the latest version of Terraform).

An example of an upcoming change that will require later versions of Terraform would be generating docs for the upcoming provider defined functions, which the function schemas will only be available via the terraform providers schema command in Terraform v1.8.x and later.

I will add this information to our README.md and the --help text for the --tf-version flag. Thanks!

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
2 participants