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

String interpolations when specifying required_version #13603

Closed
ajlanghorn opened this issue Apr 12, 2017 · 3 comments
Closed

String interpolations when specifying required_version #13603

ajlanghorn opened this issue Apr 12, 2017 · 3 comments

Comments

@ajlanghorn
Copy link
Contributor

Hello,

I've just started working on a team with a repository which has a .terraform-version file in, which is consumed by tfenv. tfenv works in a very similar fashion to tools such as rbenv, in that it wraps installation and management of a particular version of Terraform.

I refactored a bit of our code base to make use of required_version in the terraform block, as per the docs, but wanted to read in the value from the .terraform-version file, which just contains the version:

$ cat .terraform-version
0.9.3

Unfortunately, it seems the required_version parameter doesn't accept string interpolations, so I can't read the version in using:

terraform {
   required_version = "${file(".terraform-version")}"
}

Is there a reason required_version doesn't accept string interpolations?

Cheers,

Andrew

@jbardin
Copy link
Member

jbardin commented Apr 13, 2017

Hi @ajlanghorn,

This is working as intended or now. The terraform config is loaded very early on, before any interpolation is done.

We can track the feature request with an existing issue at #13022

@jbardin jbardin closed this as completed Apr 13, 2017
@mhowell-ims
Copy link

I'm trying to do the same thing, with the same result.

@ghost
Copy link

ghost commented Apr 6, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants