Skip to content

Instantly share code, notes, and snippets.

@YakDriver
Created September 23, 2020 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YakDriver/2bac747adcc2a410614cf6b7b86cea0b to your computer and use it in GitHub Desktop.
Save YakDriver/2bac747adcc2a410614cf6b7b86cea0b to your computer and use it in GitHub Desktop.
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