Terraformの型をまとめました。
不足があれば追記してく予定です。
string
文字列はダブルクォートで囲まれたUnicode文字のシーケンスで表現されます。
variable "example_string" {
default = "hello"
}
number
数値は引用符なしの数字のシーケンスで表現されます。
variable "example_number" {
default = 15
}
list(またはtuple)
リストは値のカンマ区切りのシーケンスで、角括弧で囲まれて表現されます。
variable "example_list" {
default = ["us-west-1a", "us-west-1c"]
}
map(またはobject)
マップは
variable "example_map" {
default = {
name = "Mabel"
age = 52
}
}
null
null値は引用符なしのnullで表現されます。
variable "example_null" {
default = null
}
参考サイト
Types and Values - Configuration Language | Terraform | HashiCorp Developer
