Emphasise "first". (#31653)

From the documentation, I could not make up of only the index of the first occurrence is returned. By some local testing, I've verified this.
pull/37028/head
Robert de Bock 11 months ago committed by GitHub
parent dd10cfc048
commit a56264b792
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -5,7 +5,7 @@ description: The index function finds the element index for a given value in a l
# `index` Function
`index` finds the element index for a given value in a list.
`index` finds the first element index for a given value in a list.
```hcl
index(list, value)
@ -21,6 +21,13 @@ value is not present in the list.
1
```
In this example, the index of the first occurence of `"two"` is returned.
```
> index(["one", "two", "two"], "two")
1
```
## Related Functions
* [`element`](/terraform/language/functions/element) retrieves a particular element from a list given

Loading…
Cancel
Save