variableブロックはvariables.tfに定義する
ルール
Define variable blocks in variables.tf.
(variableブロックはvariables.tfに定義する)
解説
variableブロックの置き場所を定めておくことで可読性を向上させます。
サンプルコード
# variables.tf
variable "environment" {
type = string
description = "Environment name (e.g., production, staging)"
}
variable "vpc_cidr" {
type = string
description = "CIDR block for VPC"
}
variable "enable_nat_gateway" {
type = bool
description = "Whether to create NAT Gateway for private subnets"
}
参考リンク
Show Text to Sharevariableブロックはvariables.tfに定義する https://www.tricrow.com/infrastructure/development-guidline/coding_standards.style.variables.html

