config

package
v0.17.0-fb5c7af Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: MIT Imports: 11 Imported by: 7

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"`
	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"`
	ExtraVars          map[string]string `json:"extra_vars,omitempty"`
	InfraBucket        *string           `json:"infra_s3_bucket"`
	ModuleSource       *string           `json:"module_source"`
	Owner              *string           `json:"owner"`
	Project            *string           `json:"project"`
	TerraformVersion   *string           `json:"terraform_version"`
	TfLint             *TfLint           `json:"tflint,omitempty"`
}

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