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

Terraform crash with parameterized AWS provider version #16472

Closed
giorgio-v opened this issue Oct 27, 2017 · 2 comments
Closed

Terraform crash with parameterized AWS provider version #16472

giorgio-v opened this issue Oct 27, 2017 · 2 comments

Comments

@giorgio-v
Copy link

Maybe it’s not supported, but it’s the wrong behavior nonetheless.

Terraform Version

Terraform v0.10.8

Terraform Configuration Files

variable "aws_vers" {
    default = "1.1.0"
}

provider "aws" {
    version = "${var.aws_vers}"
    region = "eu-west-1"
}

Debug Output

https://gist.github.com/giorgio-v/a22c54fca50f970fc95e238ce37d4def

Crash Output

https://gist.github.com/giorgio-v/a22c54fca50f970fc95e238ce37d4def

Expected Behavior

https://gist.github.com/giorgio-v/a22c54fca50f970fc95e238ce37d4def

Actual Behavior

https://gist.github.com/giorgio-v/a22c54fca50f970fc95e238ce37d4def

Steps to Reproduce

Please list the full steps required to reproduce the issue, for example:

  1. terraform init
  2. terraform plan

Important Factoids

NA

References

NA

@apparentlymart
Copy link
Contributor

Hi @giorgio-v! Sorry for this crash.

This seems to be the same as #15742. Indeed this isn't supposed to crash, but it also isn't intended to work either, because the provider dependency is a property of the configuration itself dealt with during terraform init, rather than something that can dynamically change per-run. (Variables are a per-run thing, so they are not usable in terraform init.)

As noted in #15742, we'll fix this by making it generate a proper error message rather than a crash, but making version constraints settable by variables is not possible.

I'm going to close this just to consolidate the discussion in #15742. Thanks for reporting this!

@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

3 participants