config

package
v4.7.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 5 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
	WhenParseError WhenParseError `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 `yaml:"-"`
	Terraform          Terraform
	Vars               map[string]string `yaml:"-"`
	EmbeddedVarNames   []string          `yaml:"embedded_var_names"`
	Templates          map[string]string
	Log                Log
	GHEBaseURL         string `yaml:"ghe_base_url"`
	GHEGraphQLEndpoint string `yaml:"ghe_graphql_endpoint"`
	GitHubToken        string `yaml:"-"`
	PlanPatch          bool   `yaml:"plan_patch"`
	RepoOwner          string `yaml:"repo_owner"`
	RepoName           string `yaml:"repo_name"`
	Output             string `yaml:"-"`
}

Config is for tfcmt config structure

func (*Config) Find

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

Find returns config path

func (*Config) LoadFile

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

LoadFile binds the config file to Config structure

func (*Config) Validate

func (cfg *Config) Validate() error

Validate validates config file

type Log

type Log struct {
	Level string
}

type Plan

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

Plan is a terraform plan config

type Terraform

type Terraform struct {
	Plan         Plan
	Apply        Apply
	UseRawOutput bool `yaml:"use_raw_output"`
}

Terraform represents terraform configurations

type WhenAddOrUpdateOnly

type WhenAddOrUpdateOnly struct {
	Label        string
	Color        string `yaml:"label_color"`
	DisableLabel bool   `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
	Color        string `yaml:"label_color"`
	DisableLabel bool   `yaml:"disable_label"`
}

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

type WhenNoChanges

type WhenNoChanges struct {
	Label          string
	Color          string `yaml:"label_color"`
	DisableLabel   bool   `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
}

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

type WhenPlanError

type WhenPlanError struct {
	Label        string
	Color        string `yaml:"label_color"`
	DisableLabel bool   `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