Posted by: Pdfprep
Post Date: March 4, 2021
What is the result of the following terraform function call?
lookup ({a="hello", b="goodbye"}, "c", "what?")
A . goodbye
B . hello
C . what?
D . c
Answer: C
Explanation:
lookup retrieves the value of a single element from a map, given its key. If the given key does not exist, the given default value is returned instead. In this case, the function call is searching for the key "c". But since there is no key "c", the default vault "what?" is returned. https://www.terraform.io/docs/configuration/functions/lookup.html
Leave a Reply