Terraform

Is there any limitation to "count" meta-argument?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

  • count isn't supported within an inline block
  • It's quite limited when it comes to lists.You'll notice that modifying items in lists or even operations like removal sometimes interpreted in a way you didn't expect. For example, removing an item from a list, may shift other items to a new position and since each position represents a resource with count, that may lead to a result where wrong resources are being modified and removed. There are ways to do deal it, but still using count with lists is not always straightforward