plan

package
v0.56.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 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 AWSProvider added in v0.21.0

type AWSProvider struct {
	AccountID json.Number `yaml:"account_id"`
	Alias     *string     `yaml:"alias"`
	Profile   *string     `yaml:"profile"`
	Region    string      `yaml:"region"`
	RoleArn   *string     `yaml:"role_arn"`
}

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 `yaml:",inline"`

	Account string     `yaml:"account"`
	Global  *Component `yaml:"global"`
}

Account is an account

type Backend added in v0.41.0

type Backend struct {
	Kind   BackendKind    `yaml:"kind"`
	S3     *S3Backend     `yaml:"s3,omitempty"`
	Remote *RemoteBackend `yaml:"remote,omitempty"`
}

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

type BackendKind added in v0.43.0

type BackendKind string

BackendKind is a enum of backends we support

const (
	// BackendKindS3 is https://www.terraform.io/docs/backends/types/s3.html
	BackendKindS3     BackendKind = "s3"
	BackendKindRemote BackendKind = "remote"
)

type BlessProvider added in v0.22.0

type BlessProvider struct {
	AdditionalRegions []string `yaml:"additional_regions,omitempty"`
	AWSProfile        *string  `yaml:"aws_profile,omitempty"`
	AWSRegion         string   `yaml:"aws_region,omitempty"`
	RoleArn           *string  `yaml:"role_arn,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
	Env         map[string]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 `yaml:",inline"`

	EKS          *v2.EKSConfig     `yaml:"eks,omitempty"`
	Kind         *v2.ComponentKind `yaml:"kind,omitempty"`
	ModuleSource *string           `yaml:"module_source"`
	ModuleName   *string           `yaml:"module_name"`
	Global       *Component        `yaml:"global"`
}

Component is a component

type ComponentCommon added in v0.21.0

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

	AccountBackends       map[string]Backend         `yaml:"account_backends"`
	Accounts              map[string]*json.Number    `yaml:"all_accounts"`
	Backend               Backend                    `yaml:"backend"`
	ComponentBackends     map[string]Backend         `yaml:"comonent_backends"`
	Env                   string                     ` yaml:"env"`
	ExtraVars             map[string]string          `yaml:"extra_vars"`
	Name                  string                     `yaml:"name"`
	Owner                 string                     `yaml:"owner"`
	Project               string                     `yaml:"project"`
	ProviderConfiguration ProviderConfiguration      `yaml:"providers_configuration"`
	ProviderVersions      map[string]ProviderVersion `yaml:"provider_versions"`

	TfLint TfLint `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 `yaml:"components"`
	Env        string               `yaml:"env"`
	EKS        *v2.EKSConfig        `yaml:"eks"`
}

Env is an env

type GitHubActionsCIConfig added in v0.40.0

type GitHubActionsCIConfig struct {
	CIConfig
	SSHKeySecrets []string
}

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

GithubProvider represents a configuration of a github provider

type HerokuProvider added in v0.37.0

type HerokuProvider struct {
}

type KubernetesProvider added in v0.56.0

type KubernetesProvider struct {
}

type Module

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

Module is a module

type OktaProvider added in v0.23.0

type OktaProvider struct {
	OrgName string  `yaml:"org_name,omitempty"`
	BaseURL *string `yaml:"base_url,omitempty"`
}

OktaProvider represents Okta configuration

type Plan

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

Plan represents a set of actions to take

func Eval

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

Eval evaluates a config

type ProviderConfiguration added in v0.56.0

type ProviderConfiguration struct {
	AWS                    *AWSProvider        `yaml:"aws"`
	AWSAdditionalProviders []AWSProvider       `yaml:"aws_regional_providers"`
	Bless                  *BlessProvider      `yaml:"bless"`
	Datadog                *DatadogProvider    `yaml:"datadog"`
	Github                 *GithubProvider     `yaml:"github"`
	Heroku                 *HerokuProvider     `yaml:"heroku"`
	Kubernetes             *KubernetesProvider `yaml:"kubernetes"`
	Okta                   *OktaProvider       `yaml:"okta"`
	Sentry                 *SentryProvider     `yaml:"sentry"`
	Snowflake              *SnowflakeProvider  `yaml:"snowflake"`
	Tfe                    *TfeProvider        `yaml:"tfe"`
}

type ProviderVersion added in v0.56.0

type ProviderVersion struct {
	Source  string  `yaml:"source"`
	Version *string `yaml:"version"`
}

type RemoteBackend added in v0.43.0

type RemoteBackend struct {
	HostName     string `yaml:"host_name"`
	Organization string `yaml:"organization"`
	Workspace    string `yaml:"workspace"`
}

RemoteBackend represents a plan to configure a terraform remote backend

type S3Backend added in v0.41.0

type S3Backend struct {
	AccountID   *string `yaml:"account_id,omitempty"`
	AccountName string  `yaml:"account_name"`
	Bucket      string  `yaml:"bucket"`
	DynamoTable *string `yaml:"dynamo_table"`
	KeyPath     string  `yaml:"key_path"`
	Profile     *string `yaml:"profile"`
	Region      string  `yaml:"region"`
	RoleArn     *string `yaml:"role_arn"`
}

S3Backend represents aws backend configuration

type SentryProvider added in v0.56.0

type SentryProvider struct {
	Enabled bool
	BaseURL *string `yaml:"base_url,omitempty"`
}

type SnowflakeProvider added in v0.21.0

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

SnowflakeProvider represents Snowflake DB provider configuration

type TfLint added in v0.14.0

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

TfLint contains a plan for running tflint

type TfeProvider added in v0.44.0

type TfeProvider struct {
	Enabled  bool    `yaml:"enabled,omitempty"`
	Hostname *string `yaml:"hostname,omitempty"`
}

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