config

package
v4.14.1 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Apply

type Apply struct {
	Template       string         `json:"template,omitempty"`
	WhenParseError WhenParseError `json:"when_parse_error,omitempty" yaml:"when_parse_error"`
}

Apply is a terraform apply config

type CI

type CI struct {
	Name     string
	Owner    string
	Repo     string
	SHA      string
	Link     string
	PRNumber int
}

type Config

type Config struct {
	CI                 CI                `json:"-" yaml:"-"`
	Terraform          Terraform         `json:"terraform,omitempty"`
	Vars               map[string]string `json:"-" yaml:"-"`
	EmbeddedVarNames   []string          `json:"embedded_var_names,omitempty" yaml:"embedded_var_names"`
	Templates          map[string]string `json:"templates,omitempty"`
	Log                Log               `json:"log,omitempty"`
	GHEBaseURL         string            `json:"ghe_base_url,omitempty" yaml:"ghe_base_url"`
	GHEGraphQLEndpoint string            `json:"ghe_graphql_endpoint,omitempty" yaml:"ghe_graphql_endpoint"`
	PlanPatch          bool              `json:"plan_patch,omitempty" yaml:"plan_patch"`
	RepoOwner          string            `json:"repo_owner,omitempty" yaml:"repo_owner"`
	RepoName           string            `json:"repo_name,omitempty" yaml:"repo_name"`
	Output             string            `json:"-" yaml:"-"`
	Masks              []*Mask           `json:"-" yaml:"-"`
}

Config is for tfcmt config structure

func (*Config) Find

func (c *Config) Find(file string) (string, error)

Find returns config path

func (*Config) LoadFile

func (c *Config) LoadFile(path string) error

LoadFile binds the config file to Config structure

func (*Config) Validate

func (c *Config) Validate() error

Validate validates config file

type Log

type Log struct {
	Level string `json:"level,omitempty"`
}

type Mask added in v4.9.0

type Mask struct {
	Type   string
	Value  string
	Regexp *regexp.Regexp
}

type Plan

type Plan struct {
	Template            string              `json:"template,omitempty"`
	WhenAddOrUpdateOnly WhenAddOrUpdateOnly `json:"when_add_or_update_only,omitempty" yaml:"when_add_or_update_only"`
	WhenDestroy         WhenDestroy         `json:"when_destroy,omitempty" yaml:"when_destroy"`
	WhenNoChanges       WhenNoChanges       `json:"when_no_changes,omitempty" yaml:"when_no_changes"`
	WhenPlanError       WhenPlanError       `json:"when_plan_error,omitempty" yaml:"when_plan_error"`
	WhenParseError      WhenParseError      `json:"when_parse_error,omitempty" yaml:"when_parse_error"`
	DisableLabel        bool                `json:"disable_label,omitempty" yaml:"disable_label"`
	IgnoreWarning       bool                `json:"ignore_warning,omitempty" yaml:"ignore_warning"`
}

Plan is a terraform plan config

type Terraform

type Terraform struct {
	Plan         Plan  `json:"plan,omitempty"`
	Apply        Apply `json:"apply,omitempty"`
	UseRawOutput bool  `json:"use_raw_output,omitempty" yaml:"use_raw_output"`
}

Terraform represents terraform configurations

type WhenAddOrUpdateOnly

type WhenAddOrUpdateOnly struct {
	Label        string `json:"label,omitempty"`
	Color        string `json:"label_color,omitempty" yaml:"label_color"`
	DisableLabel bool   `json:"disable_label,omitempty" yaml:"disable_label"`
}

WhenAddOrUpdateOnly is a configuration to notify the plan result contains new or updated in place resources

type WhenDestroy

type WhenDestroy struct {
	Label        string `json:"label,omitempty"`
	Color        string `json:"label_color,omitempty" yaml:"label_color"`
	DisableLabel bool   `json:"disable_label,omitempty" yaml:"disable_label"`
}

WhenDestroy is a configuration to notify the plan result contains destroy operation

type WhenNoChanges

type WhenNoChanges struct {
	Label          string `json:"label,omitempty"`
	Color          string `json:"label_color,omitempty" yaml:"label_color"`
	DisableLabel   bool   `json:"disable_label,omitempty" yaml:"disable_label"`
	DisableComment bool   `yaml:"disable_comment"`
}

WhenNoChanges is a configuration to add a label when the plan result contains no change

type WhenParseError

type WhenParseError struct {
	Template string `json:"template,omitempty"`
}

WhenParseError is a configuration to notify the plan result returns an error

type WhenPlanError

type WhenPlanError struct {
	Label        string `json:"label,omitempty"`
	Color        string `json:"label_color,omitempty" yaml:"label_color"`
	DisableLabel bool   `json:"disable_label,omitempty" yaml:"disable_label"`
}

WhenPlanError is a configuration to notify the plan result returns an error

Jump to

Keyboard shortcuts

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