The value of count determines how many instances of a resource will be created. While its intent is for things like clusters of machines, in this usage we'll either create 1 or 0 of the resource depending on the value of the boolean.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
One simple solution is:
Set the variable in a suitable context, then, use
count
in the resource name with ternary operator:The value of count determines how many instances of a resource will be created. While its intent is for things like clusters of machines, in this usage we'll either create 1 or 0 of the resource depending on the value of the boolean.