Document negative host numbers for cidrhost()

This feature was introduced in
https://github.com/hashicorp/terraform/pull/13765
(and documented there), but it seems that its documentation
was not carried over when the docs were reorganized.
pull/34311/head
Zach Himsel 2 years ago committed by Zach Himsel
parent 6701fa9513
commit 2361c5dc98
No known key found for this signature in database
GPG Key ID: 9425DA87A586EAB4

@ -19,7 +19,11 @@ cidrhost(prefix, hostnum)
`hostnum` is a whole number that can be represented as a binary integer with
no more than the number of digits remaining in the address after the given
prefix. For more details on how this function interprets CIDR prefixes and
prefix. If `hostnum` is negative, the count starts from the end of the range.
For example, `cidrhost("10.0.0.0/8", 2)` returns `10.0.0.2` and
`cidrhost("10.0.0.0/8", -2)` returns `10.255.255.254`.
For more details on how this function interprets CIDR prefixes and
populates host numbers, see the worked example for
[`cidrsubnet`](/terraform/language/functions/cidrsubnet).

Loading…
Cancel
Save