What's the best way to compare two lists of string in terraform?
["arm64"] == ["arm64"] evaluates to false
My use case is constructing lambda extension ARNs based on aws_lambda_function's architectures, which has valid values ["arm64"] and ["x86_64"]. I fell back to comparing architectures[0], but that's not quite what I wanted to say: if the valid values expands in the future by allowing multiple values in the list, it may not fail fast with a clear error.
["arm64"] == ["arm64"]evaluates to false" I just attempted to reproduce that with Terraform 1.7.5 and it evaluated totrue. Please demonstrate otherwise with a MCVE, and include your version of Terraform.["arm64", "x86_64"]and["x86_64", "arm64"}to fail or not? From your question I think that you don't care about ordering, but I'm not sure