Version: v0.4.6 Latest Latest

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

Go to latest
Published: Aug 18, 2018 License: Apache-2.0 Imports: 10 Imported by: 0



Package raw contains the golang representations of the YAML elements supported in atlantis.yaml. The structs here represent the exact data that comes from the file before it is parsed/validated further.



View Source
const (
	DefaultWorkspace         = "default"
	ApprovedApplyRequirement = "approved"
View Source
const (
	ExtraArgsKey  = "extra_args"
	RunStepName   = "run"
	PlanStepName  = "plan"
	ApplyStepName = "apply"
	InitStepName  = "init"
View Source
const DefaultAutoPlanEnabled = true
View Source
const DefaultAutoPlanWhenModified = "**/*.tf*"


This section is empty.


func DefaultAutoPlan

func DefaultAutoPlan() valid.Autoplan


type Autoplan

type Autoplan struct {
	WhenModified []string `yaml:"when_modified,omitempty"`
	Enabled      *bool    `yaml:"enabled,omitempty"`

func (Autoplan) ToValid

func (a Autoplan) ToValid() valid.Autoplan

func (Autoplan) Validate

func (a Autoplan) Validate() error

type Config

type Config struct {
	Version   *int                `yaml:"version,omitempty"`
	Projects  []Project           `yaml:"projects,omitempty"`
	Workflows map[string]Workflow `yaml:"workflows,omitempty"`

Config is the representation for the whole config file at the top level.

func (Config) ToValid

func (c Config) ToValid() valid.Config

func (Config) Validate

func (c Config) Validate() error

type Project

type Project struct {
	Name              *string   `yaml:"name,omitempty"`
	Dir               *string   `yaml:"dir,omitempty"`
	Workspace         *string   `yaml:"workspace,omitempty"`
	Workflow          *string   `yaml:"workflow,omitempty"`
	TerraformVersion  *string   `yaml:"terraform_version,omitempty"`
	Autoplan          *Autoplan `yaml:"autoplan,omitempty"`
	ApplyRequirements []string  `yaml:"apply_requirements,omitempty"`

func (Project) ToValid

func (p Project) ToValid() valid.Project

func (Project) Validate

func (p Project) Validate() error

type Stage

type Stage struct {
	Steps []Step `yaml:"steps,omitempty"`

func (Stage) ToValid

func (s Stage) ToValid() valid.Stage

func (Stage) Validate

func (s Stage) Validate() error

type Step

type Step struct {
	// Key will be set in case #1 and #3 above to the key. In case #2, there
	// could be multiple keys (since the element is a map) so we don't set Key.
	Key *string
	// Map will be set in case #2 above.
	Map map[string]map[string][]string
	// StringVal will be set in case #3 above.
	StringVal map[string]string

Step represents a single action/command to perform. In YAML, it can be set as 1. A single string for a built-in command:

- init
- plan

2. A map for a built-in command and extra_args:

- plan:
    extra_args: [-var-file=staging.tfvars]

3. A map for a custom run command:

- run: my custom command

Here we parse step in the most generic fashion possible. See fields for more details.

func (Step) ToValid

func (s Step) ToValid() valid.Step

func (*Step) UnmarshalYAML

func (s *Step) UnmarshalYAML(unmarshal func(interface{}) error) error

func (Step) Validate

func (s Step) Validate() error

type Workflow

type Workflow struct {
	Apply *Stage `yaml:"apply,omitempty"`
	Plan  *Stage `yaml:"plan,omitempty"`

func (Workflow) ToValid

func (w Workflow) ToValid() valid.Workflow

func (Workflow) Validate

func (w Workflow) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL