variableブロックに型定義を含める
ルール
Include type definitions in variable blocks.
(variableブロックに型定義を含める)
解説
AWSの推奨に従っています。
変数に型を明示することで誤った値の代入を防ぐ他、変数の性格を推測しやすくなります。
サンプルコード
# variables.tf
variable "environment" {
type = string
description = "Environment name"
}
variable "instance_count" {
type = number
description = "Number of instances to create"
}
参考リンク
Show Text to Sharevariableブロックに型定義を含める https://www.tricrow.com/infrastructure/development-guidline/coding_standards.style.variables_type.html

