Documentation ¶
Index ¶
- Variables
- type BlockFormatConfig
- type NameValidator
- type TerraformCommentSyntaxRule
- type TerraformDeprecatedIndexRule
- type TerraformDeprecatedInterpolationRule
- func (r *TerraformDeprecatedInterpolationRule) Check(runner *tflint.Runner) error
- func (r *TerraformDeprecatedInterpolationRule) Enabled() bool
- func (r *TerraformDeprecatedInterpolationRule) Link() string
- func (r *TerraformDeprecatedInterpolationRule) Name() string
- func (r *TerraformDeprecatedInterpolationRule) Severity() string
- type TerraformDocumentedOutputsRule
- func (r *TerraformDocumentedOutputsRule) Check(runner *tflint.Runner) error
- func (r *TerraformDocumentedOutputsRule) Enabled() bool
- func (r *TerraformDocumentedOutputsRule) Link() string
- func (r *TerraformDocumentedOutputsRule) Name() string
- func (r *TerraformDocumentedOutputsRule) Severity() string
- type TerraformDocumentedVariablesRule
- func (r *TerraformDocumentedVariablesRule) Check(runner *tflint.Runner) error
- func (r *TerraformDocumentedVariablesRule) Enabled() bool
- func (r *TerraformDocumentedVariablesRule) Link() string
- func (r *TerraformDocumentedVariablesRule) Name() string
- func (r *TerraformDocumentedVariablesRule) Severity() string
- type TerraformModulePinnedSourceRule
- func (r *TerraformModulePinnedSourceRule) Check(runner *tflint.Runner) error
- func (r *TerraformModulePinnedSourceRule) Enabled() bool
- func (r *TerraformModulePinnedSourceRule) Link() string
- func (r *TerraformModulePinnedSourceRule) Name() string
- func (r *TerraformModulePinnedSourceRule) Severity() string
- type TerraformNamingConventionRule
- type TerraformRequiredProvidersRule
- func (r *TerraformRequiredProvidersRule) Check(runner *tflint.Runner) error
- func (r *TerraformRequiredProvidersRule) Enabled() bool
- func (r *TerraformRequiredProvidersRule) Link() string
- func (r *TerraformRequiredProvidersRule) Name() string
- func (r *TerraformRequiredProvidersRule) Severity() string
- type TerraformRequiredVersionRule
- type TerraformTypedVariablesRule
- type TerraformUnusedDeclarationsRule
- func (r *TerraformUnusedDeclarationsRule) Check(runner *tflint.Runner) error
- func (r *TerraformUnusedDeclarationsRule) Enabled() bool
- func (r *TerraformUnusedDeclarationsRule) Link() string
- func (r *TerraformUnusedDeclarationsRule) Name() string
- func (r *TerraformUnusedDeclarationsRule) Severity() string
- type TerraformWorkspaceRemoteRule
Constants ¶
This section is empty.
Variables ¶
var ReBitbucket = regexp.MustCompile("^bitbucket.org/(.+)/(.+)$")
ReBitbucket matches a module source which is a Bitbucket repository See https://www.terraform.io/docs/modules/sources.html#bitbucket
var ReGenericGit = regexp.MustCompile("(git://(.+)/(.+))|(git::https://(.+)/(.+))|(git::ssh://((.+)@)??(.+)/(.+)/(.+))")
ReGenericGit matches a module source which is a Git repository See https://www.terraform.io/docs/modules/sources.html#generic-git-repository
var ReGitHub = regexp.MustCompile("(^github.com/(.+)/(.+)$)|(^git@github.com:(.+)/(.+)$)")
ReGitHub matches a module source which is a GitHub repository See https://www.terraform.io/docs/modules/sources.html#github
Functions ¶
This section is empty.
Types ¶
type BlockFormatConfig ¶ added in v0.8.5
type BlockFormatConfig struct { Format string `hcl:"format,optional"` Custom string `hcl:"custom,optional"` }
BlockFormatConfig defines the pre-defined format or custom regular expression to use
type NameValidator ¶ added in v0.8.5
NameValidator contains the regular expression to validate block name, if it was a named format, and the format name/regular expression string
type TerraformCommentSyntaxRule ¶ added in v0.8.5
type TerraformCommentSyntaxRule struct{}
TerraformCommentSyntaxRule checks whether comments use the preferred syntax
func NewTerraformCommentSyntaxRule ¶ added in v0.8.5
func NewTerraformCommentSyntaxRule() *TerraformCommentSyntaxRule
NewTerraformCommentSyntaxRule returns a new rule
func (*TerraformCommentSyntaxRule) Check ¶ added in v0.8.5
func (r *TerraformCommentSyntaxRule) Check(runner *tflint.Runner) error
Check checks whether variables have type
func (*TerraformCommentSyntaxRule) Enabled ¶ added in v0.8.5
func (r *TerraformCommentSyntaxRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformCommentSyntaxRule) Link ¶ added in v0.8.5
func (r *TerraformCommentSyntaxRule) Link() string
Link returns the rule reference link
func (*TerraformCommentSyntaxRule) Name ¶ added in v0.8.5
func (r *TerraformCommentSyntaxRule) Name() string
Name returns the rule name
func (*TerraformCommentSyntaxRule) Severity ¶ added in v0.8.5
func (r *TerraformCommentSyntaxRule) Severity() string
Severity returns the rule severity
type TerraformDeprecatedIndexRule ¶ added in v0.8.5
type TerraformDeprecatedIndexRule struct{}
TerraformDeprecatedIndexRule warns about usage of the legacy dot syntax for indexes (foo.0)
func NewTerraformDeprecatedIndexRule ¶ added in v0.8.5
func NewTerraformDeprecatedIndexRule() *TerraformDeprecatedIndexRule
NewTerraformDeprecatedIndexRule return a new rule
func (*TerraformDeprecatedIndexRule) Check ¶ added in v0.8.5
func (r *TerraformDeprecatedIndexRule) Check(runner *tflint.Runner) error
Check walks all expressions and emit issues if deprecated index syntax is found
func (*TerraformDeprecatedIndexRule) Enabled ¶ added in v0.8.5
func (r *TerraformDeprecatedIndexRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformDeprecatedIndexRule) Link ¶ added in v0.8.5
func (r *TerraformDeprecatedIndexRule) Link() string
Link returns the rule reference link
func (*TerraformDeprecatedIndexRule) Name ¶ added in v0.8.5
func (r *TerraformDeprecatedIndexRule) Name() string
Name returns the rule name
func (*TerraformDeprecatedIndexRule) Severity ¶ added in v0.8.5
func (r *TerraformDeprecatedIndexRule) Severity() string
Severity returns the rule severity
type TerraformDeprecatedInterpolationRule ¶ added in v0.8.5
type TerraformDeprecatedInterpolationRule struct{}
TerraformDeprecatedInterpolationRule warns of deprecated interpolation in Terraform v0.11 or earlier.
func NewTerraformDeprecatedInterpolationRule ¶ added in v0.8.5
func NewTerraformDeprecatedInterpolationRule() *TerraformDeprecatedInterpolationRule
NewTerraformDeprecatedInterpolationRule return a new rule
func (*TerraformDeprecatedInterpolationRule) Check ¶ added in v0.8.5
func (r *TerraformDeprecatedInterpolationRule) Check(runner *tflint.Runner) error
Check emits issues on the deprecated interpolation syntax. This logic is equivalent to the warning logic implemented in Terraform. See https://github.com/hashicorp/terraform/pull/23348
func (*TerraformDeprecatedInterpolationRule) Enabled ¶ added in v0.8.5
func (r *TerraformDeprecatedInterpolationRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformDeprecatedInterpolationRule) Link ¶ added in v0.8.5
func (r *TerraformDeprecatedInterpolationRule) Link() string
Link returns the rule reference link
func (*TerraformDeprecatedInterpolationRule) Name ¶ added in v0.8.5
func (r *TerraformDeprecatedInterpolationRule) Name() string
Name returns the rule name
func (*TerraformDeprecatedInterpolationRule) Severity ¶ added in v0.8.5
func (r *TerraformDeprecatedInterpolationRule) Severity() string
Severity returns the rule severity
type TerraformDocumentedOutputsRule ¶ added in v0.8.5
type TerraformDocumentedOutputsRule struct{}
TerraformDocumentedOutputsRule checks whether outputs have descriptions
func NewTerraformDocumentedOutputsRule ¶ added in v0.8.5
func NewTerraformDocumentedOutputsRule() *TerraformDocumentedOutputsRule
NewTerraformDocumentedOutputsRule returns a new rule
func (*TerraformDocumentedOutputsRule) Check ¶ added in v0.8.5
func (r *TerraformDocumentedOutputsRule) Check(runner *tflint.Runner) error
Check checks whether outputs have descriptions
func (*TerraformDocumentedOutputsRule) Enabled ¶ added in v0.8.5
func (r *TerraformDocumentedOutputsRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformDocumentedOutputsRule) Link ¶ added in v0.8.5
func (r *TerraformDocumentedOutputsRule) Link() string
Link returns the rule reference link
func (*TerraformDocumentedOutputsRule) Name ¶ added in v0.8.5
func (r *TerraformDocumentedOutputsRule) Name() string
Name returns the rule name
func (*TerraformDocumentedOutputsRule) Severity ¶ added in v0.8.5
func (r *TerraformDocumentedOutputsRule) Severity() string
Severity returns the rule severity
type TerraformDocumentedVariablesRule ¶ added in v0.8.5
type TerraformDocumentedVariablesRule struct{}
TerraformDocumentedVariablesRule checks whether variables have descriptions
func NewTerraformDocumentedVariablesRule ¶ added in v0.8.5
func NewTerraformDocumentedVariablesRule() *TerraformDocumentedVariablesRule
NewTerraformDocumentedVariablesRule returns a new rule
func (*TerraformDocumentedVariablesRule) Check ¶ added in v0.8.5
func (r *TerraformDocumentedVariablesRule) Check(runner *tflint.Runner) error
Check checks whether variables have descriptions
func (*TerraformDocumentedVariablesRule) Enabled ¶ added in v0.8.5
func (r *TerraformDocumentedVariablesRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformDocumentedVariablesRule) Link ¶ added in v0.8.5
func (r *TerraformDocumentedVariablesRule) Link() string
Link returns the rule reference link
func (*TerraformDocumentedVariablesRule) Name ¶ added in v0.8.5
func (r *TerraformDocumentedVariablesRule) Name() string
Name returns the rule name
func (*TerraformDocumentedVariablesRule) Severity ¶ added in v0.8.5
func (r *TerraformDocumentedVariablesRule) Severity() string
Severity returns the rule severity
type TerraformModulePinnedSourceRule ¶
type TerraformModulePinnedSourceRule struct {
// contains filtered or unexported fields
}
TerraformModulePinnedSourceRule checks unpinned or default version module source
func NewTerraformModulePinnedSourceRule ¶
func NewTerraformModulePinnedSourceRule() *TerraformModulePinnedSourceRule
NewTerraformModulePinnedSourceRule returns new rule with default attributes
func (*TerraformModulePinnedSourceRule) Check ¶
func (r *TerraformModulePinnedSourceRule) Check(runner *tflint.Runner) error
Check checks if module source version is pinned Note that this rule is valid only for Git or Mercurial source
func (*TerraformModulePinnedSourceRule) Enabled ¶
func (r *TerraformModulePinnedSourceRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformModulePinnedSourceRule) Link ¶
func (r *TerraformModulePinnedSourceRule) Link() string
Link returns the rule reference link
func (*TerraformModulePinnedSourceRule) Name ¶
func (r *TerraformModulePinnedSourceRule) Name() string
Name returns the rule name
func (*TerraformModulePinnedSourceRule) Severity ¶ added in v0.8.5
func (r *TerraformModulePinnedSourceRule) Severity() string
Severity returns the rule severity
type TerraformNamingConventionRule ¶ added in v0.8.5
type TerraformNamingConventionRule struct{}
TerraformNamingConventionRule checks whether blocks follow naming convention
func NewTerraformNamingConventionRule ¶ added in v0.8.5
func NewTerraformNamingConventionRule() *TerraformNamingConventionRule
NewTerraformNamingConventionRule returns new rule with default attributes
func (*TerraformNamingConventionRule) Check ¶ added in v0.8.5
func (r *TerraformNamingConventionRule) Check(runner *tflint.Runner) error
Check checks whether blocks follow naming convention
func (*TerraformNamingConventionRule) Enabled ¶ added in v0.8.5
func (r *TerraformNamingConventionRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformNamingConventionRule) Link ¶ added in v0.8.5
func (r *TerraformNamingConventionRule) Link() string
Link returns the rule reference link
func (*TerraformNamingConventionRule) Name ¶ added in v0.8.5
func (r *TerraformNamingConventionRule) Name() string
Name returns the rule name
func (*TerraformNamingConventionRule) Severity ¶ added in v0.8.5
func (r *TerraformNamingConventionRule) Severity() string
Severity returns the rule severity
type TerraformRequiredProvidersRule ¶ added in v0.8.5
type TerraformRequiredProvidersRule struct{}
TerraformRequiredProvidersRule checks whether Terraform sets version constraints for all configured providers
func NewTerraformRequiredProvidersRule ¶ added in v0.8.5
func NewTerraformRequiredProvidersRule() *TerraformRequiredProvidersRule
NewTerraformRequiredProvidersRule returns new rule with default attributes
func (*TerraformRequiredProvidersRule) Check ¶ added in v0.8.5
func (r *TerraformRequiredProvidersRule) Check(runner *tflint.Runner) error
Check checks whether variables have descriptions
func (*TerraformRequiredProvidersRule) Enabled ¶ added in v0.8.5
func (r *TerraformRequiredProvidersRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformRequiredProvidersRule) Link ¶ added in v0.8.5
func (r *TerraformRequiredProvidersRule) Link() string
Link returns the rule reference link
func (*TerraformRequiredProvidersRule) Name ¶ added in v0.8.5
func (r *TerraformRequiredProvidersRule) Name() string
Name returns the rule name
func (*TerraformRequiredProvidersRule) Severity ¶ added in v0.8.5
func (r *TerraformRequiredProvidersRule) Severity() string
Severity returns the rule severity
type TerraformRequiredVersionRule ¶ added in v0.8.5
type TerraformRequiredVersionRule struct{}
TerraformRequiredVersionRule checks whether a terraform version has required_version attribute
func NewTerraformRequiredVersionRule ¶ added in v0.8.5
func NewTerraformRequiredVersionRule() *TerraformRequiredVersionRule
NewTerraformRequiredVersionRule returns new rule with default attributes
func (*TerraformRequiredVersionRule) Check ¶ added in v0.8.5
func (r *TerraformRequiredVersionRule) Check(runner *tflint.Runner) error
Check checks whether variables have descriptions
func (*TerraformRequiredVersionRule) Enabled ¶ added in v0.8.5
func (r *TerraformRequiredVersionRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformRequiredVersionRule) Link ¶ added in v0.8.5
func (r *TerraformRequiredVersionRule) Link() string
Link returns the rule reference link
func (*TerraformRequiredVersionRule) Name ¶ added in v0.8.5
func (r *TerraformRequiredVersionRule) Name() string
Name returns the rule name
func (*TerraformRequiredVersionRule) Severity ¶ added in v0.8.5
func (r *TerraformRequiredVersionRule) Severity() string
Severity returns the rule severity
type TerraformTypedVariablesRule ¶ added in v0.8.5
type TerraformTypedVariablesRule struct{}
TerraformTypedVariablesRule checks whether variables have a type declared
func NewTerraformTypedVariablesRule ¶ added in v0.8.5
func NewTerraformTypedVariablesRule() *TerraformTypedVariablesRule
NewTerraformTypedVariablesRule returns a new rule
func (*TerraformTypedVariablesRule) Check ¶ added in v0.8.5
func (r *TerraformTypedVariablesRule) Check(runner *tflint.Runner) error
Check checks whether variables have type
func (*TerraformTypedVariablesRule) Enabled ¶ added in v0.8.5
func (r *TerraformTypedVariablesRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformTypedVariablesRule) Link ¶ added in v0.8.5
func (r *TerraformTypedVariablesRule) Link() string
Link returns the rule reference link
func (*TerraformTypedVariablesRule) Name ¶ added in v0.8.5
func (r *TerraformTypedVariablesRule) Name() string
Name returns the rule name
func (*TerraformTypedVariablesRule) Severity ¶ added in v0.8.5
func (r *TerraformTypedVariablesRule) Severity() string
Severity returns the rule severity
type TerraformUnusedDeclarationsRule ¶ added in v0.8.5
type TerraformUnusedDeclarationsRule struct{}
TerraformUnusedDeclarationsRule checks whether variables, data sources, or locals are declared but unused
func NewTerraformUnusedDeclarationsRule ¶ added in v0.8.5
func NewTerraformUnusedDeclarationsRule() *TerraformUnusedDeclarationsRule
NewTerraformUnusedDeclarationsRule returns a new rule
func (*TerraformUnusedDeclarationsRule) Check ¶ added in v0.8.5
func (r *TerraformUnusedDeclarationsRule) Check(runner *tflint.Runner) error
Check emits issues for any variables, locals, and data sources that are declared but not used
func (*TerraformUnusedDeclarationsRule) Enabled ¶ added in v0.8.5
func (r *TerraformUnusedDeclarationsRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformUnusedDeclarationsRule) Link ¶ added in v0.8.5
func (r *TerraformUnusedDeclarationsRule) Link() string
Link returns the rule reference link
func (*TerraformUnusedDeclarationsRule) Name ¶ added in v0.8.5
func (r *TerraformUnusedDeclarationsRule) Name() string
Name returns the rule name
func (*TerraformUnusedDeclarationsRule) Severity ¶ added in v0.8.5
func (r *TerraformUnusedDeclarationsRule) Severity() string
Severity returns the rule severity
type TerraformWorkspaceRemoteRule ¶ added in v0.8.5
type TerraformWorkspaceRemoteRule struct{}
TerraformWorkspaceRemoteRule warns of the use of terraform.workspace with a remote backend
func NewTerraformWorkspaceRemoteRule ¶ added in v0.8.5
func NewTerraformWorkspaceRemoteRule() *TerraformWorkspaceRemoteRule
NewTerraformWorkspaceRemoteRule return a new rule
func (*TerraformWorkspaceRemoteRule) Check ¶ added in v0.8.5
func (r *TerraformWorkspaceRemoteRule) Check(runner *tflint.Runner) error
Check checks for a "remote" backend and if found emits issues for each use of terraform.workspace in an expression.
func (*TerraformWorkspaceRemoteRule) Enabled ¶ added in v0.8.5
func (r *TerraformWorkspaceRemoteRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformWorkspaceRemoteRule) Link ¶ added in v0.8.5
func (r *TerraformWorkspaceRemoteRule) Link() string
Link returns the rule reference link
func (*TerraformWorkspaceRemoteRule) Name ¶ added in v0.8.5
func (r *TerraformWorkspaceRemoteRule) Name() string
Name returns the rule name
func (*TerraformWorkspaceRemoteRule) Severity ¶ added in v0.8.5
func (r *TerraformWorkspaceRemoteRule) Severity() string
Severity returns the rule severity
Source Files ¶
- terraform_comment_syntax.go
- terraform_deprecated_index.go
- terraform_deprecated_interpolation.go
- terraform_documented_outputs.go
- terraform_documented_variables.go
- terraform_module_pinned_source.go
- terraform_naming_convention.go
- terraform_required_providers.go
- terraform_required_version.go
- terraform_typed_variables.go
- terraform_unused_declaration.go
- terraform_workspace_remote.go