- v1.3.x (latest)
- v1.2.x
- v1.1 and earlier
- Overview
- Attributes as Blocks - Configuration Language
- Data Sources
- Overview
- abs
- abspath
- alltrue
- anytrue
- base64decode
- base64encode
- base64gzip
- base64sha256
- base64sha512
- basename
- bcrypt
- can
- ceil
- chomp
- chunklist
- cidrhost
- cidrnetmask
- cidrsubnet
- cidrsubnets
- coalesce
- coalescelist
- compact
- concat
- contains
- csvdecode
- dirname
- distinct
- element
- endswith
- file
- filebase64
- filebase64sha256
- filebase64sha512
- fileexists
- filemd5
- fileset
- filesha1
- filesha256
- filesha512
- flatten
- floor
- format
- formatdate
- formatlist
- indent
- index
- join
- jsondecode
- jsonencode
- keys
- length
- list
- log
- lookup
- lower
- map
- matchkeys
- max
- md5
- merge
- min
- nonsensitive
- one
- parseint
- pathexpand
- pow
- range
- regex
- regexall
- replace
- reverse
- rsadecrypt
- sensitive
- setintersection
- setproduct
- setsubtract
- setunion
- sha1
- sha256
- sha512
- signum
- slice
- sort
- split
- startswith
- strrev
- substr
- sum
- templatefile
- textdecodebase64
- textencodebase64
- timeadd
- timecmp
- timestamp
- title
- tobool
- tolist
- tomap
- tonumber
- toset
- tostring
- transpose
- trim
- trimprefix
- trimspace
- trimsuffix
- try
- type
- upper
- urlencode
- uuid
- uuidv5
- values
- yamldecode
- yamlencode
- zipmap
- Upgrading to Terraform v1.3
- v1.x Compatibility Promises
- Terraform Internals
- Intro to Terraform
- Configuration Language
- Terraform CLI
- Terraform Cloud
- Terraform Enterprise
- Provider Use
- Plugin Development
- Registry Publishing
- Integration Program
- Terraform Tools
- CDK for Terraform
- Glossary
Terraform Language
Other Docs
A new platform for documentation and tutorials is launching soon.
We are migrating Terraform documentation into HashiCorp Developer, our new developer experience.
»floor
Function
floor
returns the closest whole number that is less than or equal to the
given value, which may be a fraction.
»Examples
> floor(5) 5 > floor(4.9) 4
> floor(5)
5
> floor(4.9)
4
»Related Functions
ceil
, which rounds to the nearest whole number greater than or equal.