Hello,
I created several resources with count feature.
I would like to count.index to generate the description.
However I would like to start from 1 and not from 0.
Is-it possible to do a sum in terraform ?
Thanks.
Hello,
I created several resources with count feature.
I would like to count.index to generate the description.
However I would like to start from 1 and not from 0.
Is-it possible to do a sum in terraform ?
Thanks.
Hi @smutel,
The Terraform language has arithmetic and logical operators similar to some other common languages, including a +
operator for addition.
You can therefore get the result you want with an expression like count.index + 1
.
Thanks for you help.