plan

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: MIT Imports: 9 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 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 Backend added in v0.41.0

type Backend struct {
	Type BackendType `yaml:"type"`
	S3   *S3Backend  `yaml:"s3,omitempty"`
}

Backend represents a plan for configuring the terraform backend. Only one struct member can be non-nil at a time

type BackendType added in v0.41.0

type BackendType string

BackendType is a enum of backends we support

const (
	// BackendTypeS3 is https://www.terraform.io/docs/backends/types/s3.html
	BackendTypeS3 BackendType = "s3"
)

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       *v2.EKSConfig      `json:"eks,omitempty" yaml:"eks,omitempty"`
	Env       string

	Kind            *v2.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"`

	Backend   Backend           `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
	GitHubActionsCI GitHubActionsComponent
}

ComponentCommon represents common fields for components

type DatadogProvider added in v0.40.0

type DatadogProvider struct{}

type Env

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

Env is an env

type GitHubActionsCIConfig added in v0.40.0

type GitHubActionsCIConfig struct {
	CIConfig
}

type GitHubActionsComponent added in v0.40.0

type GitHubActionsComponent struct {
	CIComponent
}

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 HerokuProvider added in v0.37.0

type HerokuProvider struct{}

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"`
	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:"github_actions_ci" yaml:"github_actions_ci"`
	GitHubActionsCI GitHubActionsCIConfig `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"`
	Heroku    *HerokuProvider    `yaml:"heroku"`
	Snowflake *SnowflakeProvider `yaml:"snowflake"`
	Bless     *BlessProvider     `yaml:"bless"`
	Okta      *OktaProvider      `yaml:"okta"`
	Datadog   *DatadogProvider   `yaml:"datadog"`
}

type S3Backend added in v0.41.0

type S3Backend 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"`
}

S3Backend represents aws backend configuration

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