plan

package
v0.87.7 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 13 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

func (*AWSProvider) String added in v0.58.5

func (a *AWSProvider) String() string

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 AssertProvider added in v0.61.1

type AssertProvider struct {
	CommonProvider `yaml:",inline"`
}

type Auth0Provider added in v0.58.5

type Auth0Provider struct {
	CommonProvider `yaml:",inline"`
	Domain         string `yaml:"domain,omitempty"`
}

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 {
	CommonProvider    `yaml:",inline"`
	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 CommonProvider added in v0.78.0

type CommonProvider struct {
	CustomProvider bool   `yaml:"custom_provider,omitempty"`
	Enabled        bool   `yaml:"enabled,omitempty"`
	Version        string `yaml:"version,omitempty"`
}

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"`
	Variables       []string          `yaml:"variables"`
	ProviderAliases map[string]string `yaml:"provider_aliases"`
	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 {
	CommonProvider `yaml:",inline"`
}

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
	RunsOn        []string
}

type GitHubActionsComponent added in v0.40.0

type GitHubActionsComponent struct {
	CIComponent
}

type GithubProvider added in v0.30.0

type GithubProvider struct {
	CommonProvider `yaml:",inline"`
	Organization   string  `yaml:"organization"`
	BaseURL        *string `yaml:"base_url"`
}

GithubProvider represents a configuration of a github provider

type GrafanaProvider added in v0.57.0

type GrafanaProvider struct {
	CommonProvider `yaml:",inline"`
}

type HelmProvider added in v0.86.0

type HelmProvider struct {
	CommonProvider `yaml:",inline"`
}

type HerokuProvider added in v0.37.0

type HerokuProvider struct {
	CommonProvider `yaml:",inline"`
}

type KubectlProvider added in v0.82.0

type KubectlProvider struct {
	CommonProvider `yaml:",inline"`
}

type KubernetesProvider added in v0.56.0

type KubernetesProvider struct {
	CommonProvider       `yaml:",inline"`
	ClusterComponentName *string `yaml:"cluster_component_name,omitempty"`
}

type Module

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

Module is a module

type OktaProvider added in v0.23.0

type OktaProvider struct {
	CommonProvider `yaml:",inline"`
	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"`
	TFE             *TFEConfig            `yaml:"tfe"`
}

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 {
	Assert                 *AssertProvider     `yaml:"assert"`
	Auth0                  *Auth0Provider      `yaml:"auth0"`
	AWS                    *AWSProvider        `yaml:"aws"`
	AWSAdditionalProviders []AWSProvider       `yaml:"aws_regional_providers"`
	Bless                  *BlessProvider      `yaml:"bless"`
	Datadog                *DatadogProvider    `yaml:"datadog"`
	Github                 *GithubProvider     `yaml:"github"`
	Grafana                *GrafanaProvider    `yaml:"grafana"`
	Heroku                 *HerokuProvider     `yaml:"heroku"`
	Kubernetes             *KubernetesProvider `yaml:"kubernetes"`
	Helm                   *HelmProvider       `yaml:"helm"`
	Kubectl                *KubectlProvider    `yaml:"kubectl"`
	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 {
	CommonProvider `yaml:",inline"`
	BaseURL        *string `yaml:"base_url,omitempty"`
}

type SnowflakeProvider added in v0.21.0

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

SnowflakeProvider represents Snowflake DB provider configuration

type TFEConfig added in v0.72.0

type TFEConfig struct {
	Component
	ReadTeams                      []string
	Branch                         string
	GithubOrg                      string
	GithubRepo                     string
	TFEOrg                         string
	SSHKeyName                     string
	ExcludedGithubRequiredChecks   []string
	AdditionalGithubRequiredChecks []string
}

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