Slide 30
Slide 30 text
indexの実⾏結果
30
$ echo 'index(["ap-northeast-1c", "ap-northeast-1a", "ap-northeast-1d",
"ap-northeast-1a"], "ap-northeast-1a")' | terraform console
1
$ echo 'index(["ap-northeast-1c", "ap-northeast-1a", "ap-northeast-1d",
"ap-northeast-1a"], "ap-northeast-1c")' | terraform console
0
$ echo 'index(tolist(toset(["ap-northeast-1c", "ap-northeast-1a", "ap-
northeast-1d", "ap-northeast-1a"])), "ap-northeast-1a")' | terraform
console
0
$ echo 'index(tolist(toset(["ap-northeast-1c", "ap-northeast-1a", "ap-
northeast-1d", "ap-northeast-1a"])), "ap-northeast-1c")' | terraform
console
1