首页 » 运维 » 正文

terraform build in function 内置函数

terraform 常用内置函数

basename(“/home/abc/file.txt “)    ==>   file.txt  这个会返回路径的最后的文件名

coalesce(“”,””,”hello”)  ==> hello 这个会返回第一个非空

element(list,index) List中的具体某个元素

format(formats, args ) 格式化

index(list,elem)  找到List中的具体第几个是我们想要查找的elements

join(delim,list)

lookup(map,key,[default])

lower(string)

merge(map1,map2)

replace(string,search,replace)

split(delim,string)

substr()

timestap()

uuid()

values(map)

 

 

 

Zhiming Zhang

Senior devops at Appannie
一个奔跑在运维路上的胖子
Zhiming Zhang

Latest posts by Zhiming Zhang (see all)