generated from terraform-linters/tflint-ruleset-template
-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
It would be nice if we can create a linting rule to enforce the order of arguments for vars, outputs, and modules
terraform_module_argument_order
rule "terraform_module_argument_order" {
enabled = true
order = ["source", "version", "count", "for_each"]
}
This would work
module "example" {
source = ""
version = ""
}
This would fail
module "example" {
version = ""
source = ""
}
terraform_variable_argument_order
rule "terraform_variable_argument_order" {
enabled = true
order = ["type", "description", "default", "sensitive", "validation"]
}
This would work
variable "example" {
type = "string"
description = ""
default = ""
sensitive = true
validation {}
}
This would fail
variable "example" {
description = ""
type = "string"
default = ""
sensitive = true
validation {}
}
terraform_output_argument_order
rule "terraform_output_argument_order" {
enabled = true
order = ["description", "value"]
}
This would work
output "example" {
description = ""
type = ""
}
This would fail
output "example" {
type = ""
description = ""
}
entscheidungsproblem and davidorleaPatMyron
Metadata
Metadata
Assignees
Labels
No labels