You can remove specific elements from a list or a set with this syntax
$ terraform console > [for i in [1, 2, 3, 4, 5]: i if i != 3] [ 1, 2, 4, 5, ] > toset([for i in toset([1, 2, 3, …