Answers for "terraform ternary"

0

terraform ternary

# <condition> ? <val_if_true> : <val_if_false>

# Example
myResourceField = var.a =! "foo" ? "hello" : "world"
# if var.a doesn't equal "foo", myResourceField will be set to "hello",
# else it will be set to "world".
Posted by: Guest on May-13-2021

Browse Popular Code Answers by Language