Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AWS Provider - Lists vs. sets

TypeSet vs. TypeList for Arguments and Attributes

General rule:

  1. Use TypeSet when collection elements should be unique and order doesn't matter
  2. Use TypeList otherwise

Special considerations:

  1. If the argument needs to be optional and computed, only TypeList is supported (probably)
  2. For configuration blocks where there can be only one, use TypeList MaxItems 1 to simplify things in the code/testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment