github.com/rstandt/terraform@v0.12.32-0.20230710220336-b1063613405c/configs/configupgrade/testdata/valid/funcs-replaced/want/funcs-replaced.tf (about) 1 locals { 2 list = ["a", "b", "c"] 3 list_concat = concat(["a", "b"], ["c"]) 4 list_empty = [] 5 6 map = { 7 "a" = "b" 8 "c" = "d" 9 } 10 map_merge = merge( 11 { 12 "a" = "b" 13 }, 14 { 15 "c" = "d" 16 }, 17 ) 18 map_empty = {} 19 map_invalid = map("a", "b", "c") 20 21 list_of_map = [ 22 { 23 "a" = "b" 24 }, 25 ] 26 map_of_list = { 27 "a" = ["b"] 28 } 29 30 lookup_literal = { 31 "a" = "b" 32 }["a"] 33 lookup_ref = local.map["a"] 34 35 # Undocumented HIL implementation details that some users nonetheless relied on. 36 conv_bool_to_string = tostring(tobool(true)) 37 conv_float_to_int = floor(1.5) 38 conv_float_to_string = tostring(tonumber(1.5)) 39 conv_int_to_float = floor(1) 40 conv_int_to_string = tostring(floor(1)) 41 conv_string_to_int = floor(tostring("1")) 42 conv_string_to_float = tonumber(tostring("1.5")) 43 conv_string_to_bool = tobool(tostring("true")) 44 }