rules

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Naming.
	HyphenInName = &Rule{"TF001", `Resource name must not contain a "-". Prefer underscores ("_") instead.`}

	// Ordering.
	ProviderNewline  = &Rule{"TF050", `Provider-specific attributes must have an additional newline separating them from the next section.`}
	MetaBlockNewline = &Rule{"TF051", `Meta block must have an additional newline separating it from the next section.`}

	// Ordering.
	LeadingMetaBlockAttribute  = &Rule{"TF100", `Attribute must be in the meta block at the top of the definition.`}
	ProviderAttributes         = &Rule{"TF101", `Attribute must be below any meta attributes (e.g. "for_each", "count") but above all other attributes. Attributes must be ordered organization > folder > project.`}
	TrailingMetaBlockAttribute = &Rule{"TF199", `Attribute must be at the bottom of the resource definition and in the order "depends_on" then "lifecycle."`}
)

Functions

This section is empty.

Types

type Rule

type Rule struct {
	// ID is the unique identifier for the rule, used in ignore clauses.
	ID string

	// Description is the human-friendly description of the rule.
	Description string
}

Rule represents a single rule entry.

Jump to

Keyboard shortcuts

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