Skip to content

Commit

Permalink
Update .tflint.hcl
Browse files Browse the repository at this point in the history
  • Loading branch information
ShibraAmin18 committed Aug 3, 2022
1 parent bd62daf commit b3bcff3
Showing 1 changed file with 111 additions and 49 deletions.
160 changes: 111 additions & 49 deletions .tflint.hcl
Original file line number Diff line number Diff line change
@@ -1,50 +1,112 @@
rule "terraform_deprecated_interpolation" {
enabled = true
}

rule "terraform_documented_outputs" {
enabled = true
}

rule "terraform_documented_variables" {
enabled = true
}

rule "terraform_typed_variables" {
enabled = true
}

rule "terraform_required_version" {
enabled = true
}

rule "terraform_required_providers" {
enabled = true
}

rule "terraform_unused_required_providers" {
enabled = true
}

rule "aws_resource_missing_tags" {
enabled = true
tags = [
"Name",
"Environment",
]
}

rule "terraform_naming_convention" {
enabled = true
format = "none"

locals {
format = "snake_case"
}
}

plugin "aws" {
enabled = true
version = "0.14.0"
source = "github.com/terraform-linters/tflint-ruleset-aws"
plugin "aws" {
enabled = true
version = "0.14.0"
source = "github.com/terraform-linters/tflint-ruleset-aws"
}

config {
#Enables module inspection
module = true
force = false
}

# Required that all AWS resources have specified tags.
rule "aws_resource_missing_tags" {
enabled = true
tags = [
"Name",
"Environment",
]
}

# Disallow deprecated (0.11-style) interpolation
rule "terraform_deprecated_interpolation" {
enabled = true
}

# Disallow legacy dot index syntax.
rule "terraform_deprecated_index" {
enabled = true
}

# Disallow variables, data sources, and locals that are declared but never used.
rule "terraform_unused_declarations" {
enabled = true
}

# Disallow // comments in favor of #.
rule "terraform_comment_syntax" {
enabled = false
}

# Disallow output declarations without description.
rule "terraform_documented_outputs" {
enabled = true
}

# Disallow variable declarations without description.
rule "terraform_documented_variables" {
enabled = true
}

# Disallow variable declarations without type.
rule "terraform_typed_variables" {
enabled = true
}

# Disallow specifying a git or mercurial repository as a module source without pinning to a version.
rule "terraform_module_pinned_source" {
enabled = true
}

# Enforces naming conventions
rule "terraform_naming_convention" {
enabled = true

#Require specific naming structure
variable {
format = "snake_case"
}

locals {
format = "snake_case"
}

output {
format = "snake_case"
}

#Allow any format
resource {
format = "none"
}

module {
format = "none"
}

data {
format = "none"
}

}

# Disallow terraform declarations without require_version.
rule "terraform_required_version" {
enabled = true
}

# Require that all providers have version constraints through required_providers.
rule "terraform_required_providers" {
enabled = true
}

# Ensure that a module complies with the Terraform Standard Module Structure
rule "terraform_standard_module_structure" {
enabled = true
}

# terraform.workspace should not be used with a "remote" backend with remote execution.
rule "terraform_workspace_remote" {
enabled = true
}

0 comments on commit b3bcff3

Please sign in to comment.