If else in for_each statement in Terraform

Viewed 76

I'n actually reading a Json File with multiple Key value pairs in it, I need to create a resource based on the input user gives, for example, if he gives the 'A' I should choose from the first Key, if he gives 'B' I should chose the Second Key. Is it Possible in Terraform. I was able to do the If condition in For_each but I can only run it on one set of values, I need to choose the other set based on the user's input. Please help me out. Thanks in Advance.

0 Answers
Related