Unfortunately since you didn’t share the full error message it’shard to be sure exactly what this is referring to, but I’m guessing it’s pointing at the value of the subnet_ids argument, which is defined as being a set of strings but you’ve given it a set of lists of lists of strings.
Here’s a different way to write it that will produce a value of the expected type:
This works because the [*] operator produces a list, and concat concatenates multiple lists to produce a single list. (Terraform can then automatically convert the list into a set as required by subnet_ids.)
I switched over to the new-style splat syntax[*] here rather than the legacy attribute-only splat syntax.*; it doesn’t make any functional difference in this case, but since this is new code we might as well follow the advice in the documentation and switch to the new syntax.