terraformrules

package
v0.8.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2020 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

View Source
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

View Source
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

type NameValidator struct {
	Format        string
	IsNamedFormat bool
	Regexp        *regexp.Regexp
}

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

Link returns the rule reference link

func (*TerraformCommentSyntaxRule) Name added in v0.8.5

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

Link returns the rule reference link

func (*TerraformDeprecatedIndexRule) Name added in v0.8.5

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

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

Enabled returns whether the rule is enabled by default

Link returns the rule reference link

func (*TerraformDeprecatedInterpolationRule) Name added in v0.8.5

Name returns the rule name

func (*TerraformDeprecatedInterpolationRule) Severity added in v0.8.5

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

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

Link returns the rule reference link

func (*TerraformDocumentedOutputsRule) Name added in v0.8.5

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

Check checks whether variables have descriptions

func (*TerraformDocumentedVariablesRule) Enabled added in v0.8.5

Enabled returns whether the rule is enabled by default

Link returns the rule reference link

func (*TerraformDocumentedVariablesRule) Name added in v0.8.5

Name returns the rule name

func (*TerraformDocumentedVariablesRule) Severity added in v0.8.5

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

Check checks if module source version is pinned Note that this rule is valid only for Git or Mercurial source

func (*TerraformModulePinnedSourceRule) Enabled

Enabled returns whether the rule is enabled by default

Link returns the rule reference link

func (*TerraformModulePinnedSourceRule) Name

Name returns the rule name

func (*TerraformModulePinnedSourceRule) Severity added in v0.8.5

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

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

Link returns the rule reference link

func (*TerraformNamingConventionRule) Name added in v0.8.5

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

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

Link returns the rule reference link

func (*TerraformRequiredProvidersRule) Name added in v0.8.5

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

Link returns the rule reference link

func (*TerraformRequiredVersionRule) Name added in v0.8.5

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

Link returns the rule reference link

func (*TerraformTypedVariablesRule) Name added in v0.8.5

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

Check emits issues for any variables, locals, and data sources that are declared but not used

func (*TerraformUnusedDeclarationsRule) Enabled added in v0.8.5

Enabled returns whether the rule is enabled by default

Link returns the rule reference link

func (*TerraformUnusedDeclarationsRule) Name added in v0.8.5

Name returns the rule name

func (*TerraformUnusedDeclarationsRule) Severity added in v0.8.5

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

Link returns the rule reference link

func (*TerraformWorkspaceRemoteRule) Name added in v0.8.5

Name returns the rule name

func (*TerraformWorkspaceRemoteRule) Severity added in v0.8.5

func (r *TerraformWorkspaceRemoteRule) Severity() string

Severity returns the rule severity

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL