v1

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReservedVariableNames = map[string]bool{
	"aws_accounts": true,
	"aws_profile":  true,
	"env":          true,
	"owner":        true,
	"project":      true,
	"region":       true,
	"tags":         true,
}

Functions

This section is empty.

Types

type Account

type Account struct {
	AccountID          *json.Number      `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          *json.Number      `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

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

func (ck *ComponentKind) GetOrDefault() ComponentKind

GetOrDefault gets the component kind or default

type Config

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

func ReadConfig

func ReadConfig(b []byte) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the config

type Defaults

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

type EKSConfig

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

EKSConfig is the configuration for an eks cluster

type Env

type Env struct {
	AccountID          *json.Number      `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,omitempty" yaml:"terraform_version,omitempty"`
}

Module is a module

type Plugins

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

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

type TravisCI

type TravisCI struct {
	Enabled        *bool   `json:"enabled,omitempty" yaml:"enabled,omitempty"`
	AWSIAMRoleName *string `json:"aws_iam_role_name" yaml:"aws_iam_role_name"`
	TestBuckets    *int    `json:"test_buckets" yaml:"test_buckets"`
	Command        *string `json:"command,omitempty"`
}

Jump to

Keyboard shortcuts

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