Disallow //
comments in favor of #
.
# Good
// Bad
$ tflint
1 issue(s) found:
Warning: Single line comments should begin with # (terraform_comment_syntax)
on main.tf line 2:
2: // Bad
Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.1.0/docs/rules/terraform_comment_syntax.md
The Terraform language supports two different syntaxes for single-line comments: #
and //
. However, #
is the default comment style and should be used in most cases.
Replace the leading double-slash (//
) in your comment with the number sign (#
).