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

Integer divide by 0 panic #7701

Closed
pporada-gl opened this issue Jul 19, 2016 · 2 comments
Closed

Integer divide by 0 panic #7701

pporada-gl opened this issue Jul 19, 2016 · 2 comments
Assignees

Comments

@pporada-gl
Copy link

Terraform Version

Terraform v0.6.16

Affected Resource(s)

Please list the resources as a list, for example:

  • variable definition
  • output with arithmetic

Terraform Configuration Files

variable "test0" { default = 0 }
variable "test1" { default = 1 }

output "modulo 0%1"         { value = "${var.test0 % 1}" }
output "modulo 0%0"         { value = "${var.test0 % 0}" }
output "module 1%0"         { value = "${var.test1 % 0}" }
output "module 1%1"         { value = "${var.test1 % 1}" }

Panic Output

https://gist.github.com/greenlancer/fe89042fa86bb24903eccf0314285af6

Expected Behavior

While it's expected that a divide by 0 causes a failure, Terraform should display a nicer error message instead of blowing up all over the screen.

Actual Behavior

Terraform exploded

Steps to Reproduce

  1. terraform apply

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here?
Not that I could find.

@mitchellh
Copy link
Contributor

Fix queued up in HIL repo.

@ghost
Copy link

ghost commented Apr 23, 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 23, 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