Terraform: Math Interpolation - floor & ceil

Created on 29 Jun 2016  ยท  3Comments  ยท  Source: hashicorp/terraform

Is it possible to add math functions for floor(float) and ceil(float) ?

core enhancement

Most helpful comment

I would also add min and max to this request.

One example for usage of these would be -

resource "aws_nat_gateway" "nat" {
  count = "${min( length(var.azs), length(var.private_subnets) }"
}

All 3 comments

I would also add min and max to this request.

One example for usage of these would be -

resource "aws_nat_gateway" "nat" {
  count = "${min( length(var.azs), length(var.private_subnets) }"
}

(I have already had to hack an implementation for all four of these!)

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

franklinwise picture franklinwise  ยท  3Comments

ronnix picture ronnix  ยท  3Comments

shanmugakarna picture shanmugakarna  ยท  3Comments

c4milo picture c4milo  ยท  3Comments

thebenwaters picture thebenwaters  ยท  3Comments