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

Pessimistic operator is including the ceiling #55

Open
sudoforge opened this issue May 26, 2019 · 0 comments
Open

Pessimistic operator is including the ceiling #55

sudoforge opened this issue May 26, 2019 · 0 comments

Comments

@sudoforge
Copy link

sudoforge commented May 26, 2019

The pessimistic constraint operator behavior seems to have changed from:

"~> 0.11" == ">= 0.11, < 0.12"

to

"~> 0.11" == ">= 0.11, <= 0.12"

☝️ this is problematic and an undocumented (as far as i can tell) breaking change.


0.12 Implicit (with pessimistic operator)

→ tf version
Terraform v0.12.0


→ cat main.tf
terraform {
  required_version = "~> 0.11"
}

output "foo" {
  value = "we shouldn't see this when using terraform 0.12.0"
}


→ tf init

Initializing the backend...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

/tmp/main
→ tf apply

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

foo = we shouldn't see this when using terraform 0.12.0

0.12 Explicit (without pessimistic operator)

→ cat main.tf
terraform {
  required_version = ">= 0.11, < 0.12"
}

output "foo" {
  value = "we shouldn't see this when using terraform 0.12.0"
}


→ tf init

Error: Unsupported Terraform Core version

This configuration does not support Terraform version 0.12.0. To proceed,
either choose another supported Terraform version or update the root module's
version constraint. Version constraints are normally set for good reason, so
updating the constraint may lead to other errors or unexpected behavior.
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

No branches or pull requests

1 participant