attrvalue

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppFs = afero.Afero{
	Fs: afero.NewOsFs(),
}

Functions

This section is empty.

Types

type AttrValueRule

type AttrValueRule interface {
	GetResourceType() string
	GetNestedBlockType() *string
	GetAttributeName() string
}

type PartialContentEvaluationRule added in v0.12.0

type PartialContentEvaluationRule interface {
	EnableFailOnEvaluationError()
}

type SetRule

type SetRule[T cmp.Ordered] struct {
	tflint.DefaultRule // Embed the default rule to reuse its implementation
	// contains filtered or unexported fields
}

SetRule checks whether a list of numbers attribute value is one of the expected values. It is not concerned with the order of the numbers in the list.

func NewSetRule

func NewSetRule[T cmp.Ordered](resourceType string, attributeName string, expectedValues [][]T, link string, ruleName string) *SetRule[T]

NewSetRule returns a new rule with the given resource type, attribute name, and expected values.

func (*SetRule[T]) Check

func (r *SetRule[T]) Check(runner tflint.Runner) error

func (SetRule) EnableFailOnEvaluationError added in v0.12.0

func (b SetRule) EnableFailOnEvaluationError()

func (SetRule) Enabled

func (b SetRule) Enabled() bool

func (SetRule) GetAttributeName

func (b SetRule) GetAttributeName() string

func (SetRule) GetNestedBlockType

func (b SetRule) GetNestedBlockType() *string

func (SetRule) GetResourceType

func (b SetRule) GetResourceType() string

func (*SetRule[T]) Name

func (r *SetRule[T]) Name() string

func (SetRule) Severity

func (b SetRule) Severity() tflint.Severity

type SimpleRule

type SimpleRule[T any] struct {
	tflint.DefaultRule // Embed the default rule to reuse its implementation
	// contains filtered or unexported fields
}

SimpleRule checks whether a string attribute value is one of the expected values. It can be used to check string, number, and bool attributes.

func NewSimpleNestedBlockRule

func NewSimpleNestedBlockRule[T any](resourceType, nestedBlockType, attributeName string, expectedValues []T, link string, mustExist bool, ruleName string) *SimpleRule[T]

NewSimpleNestedBlockRule returns a new rule with the given resource type, attribute name, and expected values.

func NewSimpleRule

func NewSimpleRule[T any](resourceType, attributeName string, expectedValues []T, link string, mustExist bool, ruleName string) *SimpleRule[T]

NewSimpleRule returns a new rule with the given resource type, attribute name, and expected values.

func (*SimpleRule[T]) Check

func (r *SimpleRule[T]) Check(runner tflint.Runner) error

func (SimpleRule) EnableFailOnEvaluationError added in v0.12.0

func (b SimpleRule) EnableFailOnEvaluationError()

func (SimpleRule) Enabled

func (b SimpleRule) Enabled() bool

func (SimpleRule) GetAttributeName

func (b SimpleRule) GetAttributeName() string

func (SimpleRule) GetNestedBlockType

func (b SimpleRule) GetNestedBlockType() *string

func (SimpleRule) GetResourceType

func (b SimpleRule) GetResourceType() string
func (r *SimpleRule[T]) Link() string

func (*SimpleRule[T]) Name

func (r *SimpleRule[T]) Name() string

func (SimpleRule) Severity

func (b SimpleRule) Severity() tflint.Severity

type UnknownValueRule

type UnknownValueRule struct {
	tflint.DefaultRule // Embed the default rule to reuse its implementation
	// contains filtered or unexported fields
}

UnknownValueRule checks whether an attribute value is null or part of a variable with no default value.

func NewUnknownValueNestedBlockRule

func NewUnknownValueNestedBlockRule(resourceType, nestedBlockType, attributeName, link string, ruleName string) *UnknownValueRule

NewUnknownValueNestedBlockRule returns a new rule with the given resource type, nested block type, and attribute name

func NewUnknownValueRule

func NewUnknownValueRule(resourceType, attributeName, link string, ruleName string) *UnknownValueRule

NewUnknownValueRule returns a new rule with the given resource type, and attribute name

func (*UnknownValueRule) Check

func (r *UnknownValueRule) Check(runner tflint.Runner) error

func (UnknownValueRule) EnableFailOnEvaluationError added in v0.12.0

func (b UnknownValueRule) EnableFailOnEvaluationError()

func (UnknownValueRule) Enabled

func (b UnknownValueRule) Enabled() bool

func (UnknownValueRule) GetAttributeName

func (b UnknownValueRule) GetAttributeName() string

func (*UnknownValueRule) GetNestedBlockType

func (r *UnknownValueRule) GetNestedBlockType() *string

func (UnknownValueRule) GetResourceType

func (b UnknownValueRule) GetResourceType() string
func (r *UnknownValueRule) Link() string

func (*UnknownValueRule) Name

func (r *UnknownValueRule) Name() string

func (UnknownValueRule) Severity

func (b UnknownValueRule) Severity() tflint.Severity

Jump to

Keyboard shortcuts

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