plan

package
v0.36.7 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2020 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Print

func Print(p *Plan) error

Print prints a plan

Types

type AWSBackend added in v0.21.0

type AWSBackend struct {
	AccountID   *string `yaml:"account_id,omitempty"`
	AccountName string  `json:"account_name" yaml:"account_name"`
	Profile     string  `json:"profile" yaml:"profile"`
	Region      string  `json:"region" yaml:"region"`
	Bucket      string  `json:"bucket" yaml:"bucket"`
	DynamoTable *string `json:"dynamo_table" yaml:"dynamo_table"`
}

AWSBackend represents aws backend configuration

type AWSProvider added in v0.21.0

type AWSProvider struct {
	AccountID         json.Number `yaml:"account_id"`
	Profile           string      `yaml:"profile"`
	Version           string      `yaml:"version"`
	Region            string      `yaml:"region"`
	AdditionalRegions []string    `yaml:"additional_regions"`
}

AWSProvider represents AWS provider configuration

type AWSRole added in v0.24.0

type AWSRole struct {
	AccountID string `yaml:"account_id"`
	RolePath  string `yaml:"role_path"`
	RoleName  string `yaml:"role_name"`
}

type Account added in v0.15.3

type Account struct {
	ComponentCommon `json:",inline" yaml:",inline"`

	AllAccounts map[string]*json.Number `yaml:"all_accounts"`
	AccountName string                  `yaml:"account_name"`
	Global      *Component
}

Account is an account

type Atlantis added in v0.24.0

type Atlantis struct {
	Enabled  bool
	Projects []AtlantisProject

	// AWSProfiles is a map of profile name -> role info
	// TODO de-dupe this with AWSProfile in the travis-ci plan
	AWSProfiles map[string]AWSRole
}

type AtlantisComponent added in v0.24.0

type AtlantisComponent struct {
	Enabled  bool   `yaml:"enabled"`
	RoleName string `yaml:"role_name"`
	RolePath string `yaml:"role_path"`
}

type AtlantisProject added in v0.24.0

type AtlantisProject struct {
	Name             string `yaml:"name"`
	Dir              string `yaml:"dir"`
	TerraformVersion string `yaml:"terraform_version"`
	PathToRepoRoot   string `yaml:"path_to_repo_root"`
}

type BlessProvider added in v0.22.0

type BlessProvider struct {
	AdditionalRegions []string `json:"additional_regions,omitempty" yaml:"additional_regions,omitempty"`
	AWSProfile        string   `json:"aws_profile,omitempty" yaml:"aws_profile,omitempty"`
	AWSRegion         string   `json:"aws_region,omitempty" yaml:"aws_region,omitempty"`
	Version           *string  `json:"version,omitempty" yaml:"version,omitempty"`
}

BlessProvider represents Bless ssh provider configuration

type CIComponent added in v0.35.0

type CIComponent struct {
	Enabled     bool
	Buildevents bool

	AWSProfileName string
	AWSRoleName    string
	AWSAccountID   string
	Command        string
}

type CIConfig added in v0.35.0

type CIConfig struct {
	Enabled     bool
	FoggVersion string

	TestBuckets [][]CIProject
	AWSProfiles ciAwsProfiles
	Buildevents bool
	// contains filtered or unexported fields
}

type CIProject added in v0.35.0

type CIProject struct {
	Name    string
	Dir     string
	Command string
}

type CircleCIComponent added in v0.35.0

type CircleCIComponent struct {
	CIComponent

	SSHFingerprints []string
}

type CircleCIConfig added in v0.35.0

type CircleCIConfig struct {
	CIConfig
	SSHFingerprints []string
}

type Common added in v0.14.0

type Common struct {
	PathToRepoRoot   string `yaml:"path_to_repo_root"`
	TerraformVersion string `yaml:"terraform_version"`
}

Common represents common fields

type Component

type Component struct {
	ComponentCommon `json:",inline" yaml:",inline"`

	Accounts  map[string]Account `json:"accounts" yaml:"accounts"` // Reference accounts for remote state
	Component string             `json:"component" yaml:"component"`
	EKS       *v1.EKSConfig      `json:"eks,omitempty" yaml:"eks,omitempty"`
	Env       string

	Kind            *v1.ComponentKind `json:"kind,omitempty" yaml:"kind,omitempty"`
	ModuleSource    *string           `json:"module_source" yaml:"module_source"`
	OtherComponents []string          `json:"other_components" yaml:"other_components"`
	Global          *Component        `json:"global" yaml:"global"`
}

Component is a component

type ComponentCommon added in v0.21.0

type ComponentCommon struct {
	Common `yaml:",inline"`

	Atlantis  AtlantisComponent `yaml:"atlantis"`
	Backend   AWSBackend        `json:"backend" yaml:"backend"`
	ExtraVars map[string]string `json:"extra_vars" yaml:"extra_vars"`
	Owner     string            `json:"owner" yaml:"owner"`
	Project   string            `json:"project" yaml:"project"`
	Providers Providers         `json:"providers" yaml:"providers"`
	TfLint    TfLint            `json:"tf_lint" yaml:"tf_lint"`

	TravisCI TravisCIComponent
	CircleCI CircleCIComponent
}

ComponentCommon represents common fields for components

type Env

type Env struct {
	Components map[string]Component `json:"components" yaml:"components"`
	Env        string               `json:"env" yaml:"env"`
	EKS        *v1.EKSConfig        `json:"eks" yaml:"eks"`
}

Env is an env

type GithubProvider added in v0.30.0

type GithubProvider struct {
	Organization string  `yaml:"organization"`
	BaseURL      *string `yaml:"base_url"`
	Version      *string `yaml:"version"`
}

GithubProvider represents a configuration of a github provider

type Module

type Module struct {
	Common `json:",inline" yaml:",inline"`
}

Module is a module

type OktaProvider added in v0.23.0

type OktaProvider struct {
	OrgName string  `json:"org_name,omitempty"`
	Version *string `json:"version,omitempty"`
}

OktaProvider represents Okta configuration

type Plan

type Plan struct {
	Accounts map[string]Account `json:"account" yaml:"account"`
	Atlantis Atlantis           `json:"atlantis" yaml:"atlantis"`
	Envs     map[string]Env     `json:"envs" yaml:"envs"`
	Global   Component          `json:"global" yaml:"global"`
	Modules  map[string]Module  `json:"modules" yaml:"modules"`
	TravisCI TravisCIConfig     `json:"travis_ci" yaml:"travis_ci"`
	CircleCI CircleCIConfig     `json:"circle_ci" yaml:"circle_ci"`
	Version  string             `json:"version" yaml:"version"`
}

Plan represents a set of actions to take

func Eval

func Eval(c *v2.Config) (*Plan, error)

Eval evaluates a config

type Providers added in v0.21.0

type Providers struct {
	AWS       *AWSProvider       `yaml:"aws"`
	Github    *GithubProvider    `yaml:"github"`
	Snowflake *SnowflakeProvider `yaml:"snowflake"`
	Bless     *BlessProvider     `yaml:"bless"`
	Okta      *OktaProvider      `yaml:"okta"`
}

type SnowflakeProvider added in v0.21.0

type SnowflakeProvider struct {
	Account string  `json:"account,omitempty" yaml:"account,omitempty"`
	Role    string  `json:"role,omitempty" yaml:"role,omitempty"`
	Region  string  `json:"region,omitempty" yaml:"region,omitempty"`
	Version *string `json:"version,omitempty" yaml:"version,omitempty"`
}

SnowflakeProvider represents Snowflake DB provider configuration

type TfLint added in v0.14.0

type TfLint struct {
	Enabled bool `json:"enabled" yaml:"enabled"`
}

TfLint containts a plan for running tflint

type TravisCIComponent added in v0.35.0

type TravisCIComponent struct {
	CIComponent
}

type TravisCIConfig added in v0.35.0

type TravisCIConfig struct {
	CIConfig
}

Jump to

Keyboard shortcuts

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