/var/www/yatta47.log

/var/www/yatta47.log

やったのログ置場です。スクラップみたいな短編が多いかと。

【再復習】Terraformの型まとめ

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