config

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	AccountID          *int64            `json:"account_id"`
	AWSProfileBackend  *string           `json:"aws_profile_backend"`
	AWSProfileProvider *string           `json:"aws_profile_provider"`
	AWSProviderVersion *string           `json:"aws_provider_version,omitempty"`
	AWSRegionBackend   *string           `json:"aws_region_backend"`
	AWSRegionProvider  *string           `json:"aws_region_provider"`
	AWSRegions         []string          `json:"aws_regions"`
	ExtraVars          map[string]string `json:"extra_vars,omitempty"`
	InfraBucket        *string           `json:"infra_s3_bucket"`
	InfraDynamoTable   *string           `json:"infra_dynamo_db_table"`
	Owner              *string           `json:"owner"`
	Project            *string           `json:"project"`
	TerraformVersion   *string           `json:"terraform_version"`
	TfLint             *TfLint           `json:"tflint,omitempty"`
}

type Component

type Component struct {
	AccountID          *int64            `json:"account_id"`
	AWSProfileBackend  *string           `json:"aws_profile_backend"`
	AWSProfileProvider *string           `json:"aws_profile_provider"`
	AWSProviderVersion *string           `json:"aws_provider_version,omitempty"`
	AWSRegionBackend   *string           `json:"aws_region_backend"`
	AWSRegionProvider  *string           `json:"aws_region_provider"`
	AWSRegions         []string          `json:"aws_regions"`
	EKS                *EKSConfig        `json:"eks,omitempty"`
	ExtraVars          map[string]string `json:"extra_vars,omitempty"`
	InfraBucket        *string           `json:"infra_s3_bucket"`
	InfraDynamoTable   *string           `json:"infra_dynamo_db_table"`
	Kind               *ComponentKind    `json:"kind,omitempty"`
	ModuleSource       *string           `json:"module_source"`
	Owner              *string           `json:"owner"`
	Project            *string           `json:"project"`
	TerraformVersion   *string           `json:"terraform_version"`
	TfLint             *TfLint           `json:"tflint,omitempty"`
}

type ComponentKind added in v0.19.0

type ComponentKind string

ComponentKind is the kind of this component

const (
	// DefaultComponentKind defaults to terraform component
	DefaultComponentKind ComponentKind = "terraform"
	// ComponentKindTerraform is a terraform component
	ComponentKindTerraform = DefaultComponentKind
	// ComponentKindHelmTemplate is a helm template component
	ComponentKindHelmTemplate ComponentKind = "helm_template"
)

func (*ComponentKind) GetOrDefault added in v0.19.0

func (ck *ComponentKind) GetOrDefault() ComponentKind

GetOrDefault gets the component kind or defaults

type Config

type Config struct {
	Accounts map[string]Account `json:"accounts"`
	Defaults defaults           `json:"defaults"`
	Docker   bool               `json:"docker"`
	Envs     map[string]Env     `json:"envs"`
	Modules  map[string]Module  `json:"modules"`
	Plugins  Plugins            `json:"plugins"`
	TravisCI *TravisCI          `json:"travis_ci"`
}

func FindAndReadConfig

func FindAndReadConfig(fs afero.Fs, configFile string) (*Config, error)

func InitConfig

func InitConfig(project, region, bucket, table, awsProfile, owner, awsProviderVersion string) *Config

func ReadConfig

func ReadConfig(f io.Reader) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the config

type EKSConfig added in v0.19.0

type EKSConfig struct {
	ClusterName string `json:"cluster_name"`
}

EKSConfig is the configuration for an eks cluster

type Env

type Env struct {
	AccountID          *int64            `json:"account_id"`
	AWSProfileBackend  *string           `json:"aws_profile_backend"`
	AWSProfileProvider *string           `json:"aws_profile_provider"`
	AWSProviderVersion *string           `json:"aws_provider_version,omitempty"`
	AWSRegionBackend   *string           `json:"aws_region_backend"`
	AWSRegionProvider  *string           `json:"aws_region_provider"`
	AWSRegions         []string          `json:"aws_regions"`
	ExtraVars          map[string]string `json:"extra_vars,omitempty"`
	InfraBucket        *string           `json:"infra_s3_bucket"`
	InfraDynamoTable   *string           `json:"infra_dynamo_db_table"`
	Owner              *string           `json:"owner"`
	Project            *string           `json:"project"`
	TerraformVersion   *string           `json:"terraform_version"`
	TfLint             *TfLint           `json:"tflint,omitempty"`

	Components map[string]*Component `json:"components"`
}

type Module

type Module struct {
	TerraformVersion *string `json:"terraform_version"`
}

Module is a module

type Plugins added in v0.13.0

type Plugins struct {
	CustomPlugins      map[string]*plugins.CustomPlugin `json:"custom_plugins,omitempty"`
	TerraformProviders map[string]*plugins.CustomPlugin `json:"terraform_providers,omitempty"`
}

Plugins contains configuration around plugins

type TfLint added in v0.14.0

type TfLint struct {
	Enabled *bool `json:"enabled,omitempty"`
}

type TravisCI added in v0.16.5

type TravisCI struct {
	Enabled        bool   `json:"enabled"`
	AWSIAMRoleName string `json:"aws_iam_role_name"`
	TestBuckets    int    `json:"test_buckets"`
}

Jump to

Keyboard shortcuts

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