I have followed TFLints document to disable TFLints error on specific line. But it's not working.
Document link which I have followed - https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/annotations.md
Source code -
module "ecr" {
source = "../../../ecr"
name = format("%s-%s", var.name, var.env)
// tflint-ignore: terraform_unused_declarations, all, other_rule
tags = var.tags
}
Error log -
Run tflint --color --recursive --minimum-failure-severity=error
Failed to prepare rule checking; aws/applications/aberration-detection/ecr/ecr.tf:6,10-18: Reference to undeclared input variable; An input variable with the name "tags" has not been declared. This variable can be declared with a variable "tags" {} block. working_dir=aws/applications/aberration-detection/ecr:
Error: Reference to undeclared input variable
on aws/applications/aberration-detection/ecr/ecr.tf line 6, in module "ecr":
6: tags = var.tags
An input variable with the name "tags" has not been declared. This variable can be declared with a variable "tags" {} block.
TFLint Annotation should work and ignore the error for which annotation is defined.