Documentation ¶
Index ¶
- Variables
- func BackendAccountIDGetter(comm Common) *string
- func BackendAccountIdGetter(comm Common) *string
- func BackendBucketGetter(comm Common) *string
- func BackendDynamoTableGetter(comm Common) *string
- func BackendHostNameGetter(comm Common) *string
- func BackendKindGetter(comm Common) *string
- func BackendOrganizationGetter(comm Common) *string
- func BackendProfileGetter(comm Common) *string
- func BackendRegionGetter(comm Common) *string
- func BlessProviderAdditionalRegionsGetter(comm Common) []string
- func BlessProviderProfileGetter(comm Common) *string
- func BlessProviderRegionGetter(comm Common) *string
- func BlessProviderRoleArnGetter(comm Common) *string
- func BlessProviderVersionGetter(comm Common) *string
- func CircleCIRoleNameGetter(comm Common) *string
- func CircleCISSHFingerprintsGetter(comm Common) []string
- func DatadogProviderVersionGetter(comm Common) *string
- func ExtraVarsGetter(comm Common) map[string]string
- func GitHubActionsRoleNameGetter(comm Common) *string
- func GithubProviderBaseURLGetter(comm Common) *string
- func GithubProviderOrganizationGetter(comm Common) *string
- func GithubProviderVersionGetter(comm Common) *string
- func HerokuProviderVersionGetter(comm Common) *string
- func OktaProviderBaseURLGetter(comm Common) *string
- func OktaProviderOrgNameGetter(comm Common) *string
- func OktaProviderVersionGetter(comm Common) *string
- func OwnerGetter(comm Common) *string
- func ProjectGetter(comm Common) *string
- func ResolveModuleTerraformVersion(def Defaults, module Module) *string
- func ResolveOptionalString(getter func(Common) *string, commons ...Common) *string
- func ResolveOptionalStringSlice(getter func(Common) []string, commons ...Common) []string
- func ResolveRequiredInt64(getter func(Common) *int64, commons ...Common) int64
- func ResolveRequiredString(getter func(Common) *string, commons ...Common) string
- func ResolveStringArray(def []string, override []string) []string
- func ResolveStringMap(getter func(Common) map[string]string, commons ...Common) map[string]string
- func SnowflakeProviderAccountGetter(comm Common) *string
- func SnowflakeProviderRegionGetter(comm Common) *string
- func SnowflakeProviderRoleGetter(comm Common) *string
- func SnowflakeProviderVersionGetter(comm Common) *string
- func TerraformVersionGetter(comm Common) *string
- func TravisRoleNameGetter(comm Common) *string
- func ValidateAWSProvider(p *AWSProvider, component string) error
- func ValidateBackend(backend *Backend, component string) error
- type AWSProvider
- type Account
- type Backend
- type BlessProvider
- type CIProviderConfig
- type CircleCI
- type Common
- type CommonCI
- type CommonProvider
- type Component
- type ComponentKind
- type Config
- func (c *Config) Generate(r *rand.Rand, size int) reflect.Value
- func (c *Config) Validate() ([]string, error)
- func (c *Config) ValidateAWSProviders() error
- func (c *Config) ValidateBackends() error
- func (c *Config) ValidateBlessProviders() error
- func (c *Config) ValidateOktaProviders() error
- func (c *Config) ValidateSnowflakeProviders() error
- func (c *Config) ValidateToolsTfLint() ([]string, error)
- func (c *Config) ValidateTravis() error
- func (c *Config) WalkComponents(f func(component string, commons ...Common))
- type DatadogProvider
- type Defaults
- type EKSConfig
- type Env
- type GitHubActionsCI
- type GithubProvider
- type HerokuProvider
- type Module
- type OktaProvider
- type Plugins
- type Providers
- type SnowflakeProvider
- type TfLint
- type TfeProvider
- type Tools
- type TravisCI
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func BackendAccountIDGetter ¶ added in v0.43.0
func BackendAccountIdGetter ¶ added in v0.24.0
func BackendBucketGetter ¶ added in v0.21.0
func BackendDynamoTableGetter ¶ added in v0.21.0
func BackendHostNameGetter ¶ added in v0.43.0
func BackendKindGetter ¶ added in v0.43.0
BackendKindGetter retrieves the Kind for the current common object
func BackendOrganizationGetter ¶ added in v0.43.0
func BackendProfileGetter ¶ added in v0.21.0
func BackendRegionGetter ¶ added in v0.21.0
func BlessProviderAdditionalRegionsGetter ¶ added in v0.22.0
func BlessProviderProfileGetter ¶ added in v0.22.0
func BlessProviderRegionGetter ¶ added in v0.22.0
func BlessProviderRoleArnGetter ¶ added in v0.49.0
func BlessProviderVersionGetter ¶ added in v0.22.0
func CircleCIRoleNameGetter ¶ added in v0.35.0
func CircleCISSHFingerprintsGetter ¶ added in v0.35.0
func DatadogProviderVersionGetter ¶ added in v0.43.0
func ExtraVarsGetter ¶ added in v0.21.0
func GitHubActionsRoleNameGetter ¶ added in v0.40.0
func GithubProviderBaseURLGetter ¶ added in v0.30.0
func GithubProviderOrganizationGetter ¶ added in v0.30.0
func GithubProviderVersionGetter ¶ added in v0.30.0
func HerokuProviderVersionGetter ¶ added in v0.43.0
func OktaProviderBaseURLGetter ¶ added in v0.48.1
func OktaProviderOrgNameGetter ¶ added in v0.23.0
func OktaProviderVersionGetter ¶ added in v0.23.0
func OwnerGetter ¶ added in v0.21.0
func ProjectGetter ¶ added in v0.21.0
func ResolveModuleTerraformVersion ¶ added in v0.21.0
func ResolveOptionalString ¶ added in v0.21.0
func ResolveOptionalStringSlice ¶ added in v0.21.0
func ResolveRequiredInt64 ¶ added in v0.21.0
ResolveRequiredInt will resolve the value and panic if it is nil. Only to be used after validations are run.
func ResolveRequiredString ¶ added in v0.21.0
ResolveRequiredString will resolve the value and panic if it is nil. Only to be used after validations are run.
func ResolveStringArray ¶ added in v0.21.0
func ResolveStringMap ¶ added in v0.21.0
func SnowflakeProviderAccountGetter ¶ added in v0.21.0
func SnowflakeProviderRegionGetter ¶ added in v0.21.0
func SnowflakeProviderRoleGetter ¶ added in v0.21.0
func SnowflakeProviderVersionGetter ¶ added in v0.22.0
func TerraformVersionGetter ¶ added in v0.21.0
func TravisRoleNameGetter ¶ added in v0.25.0
func ValidateAWSProvider ¶ added in v0.21.0
func ValidateAWSProvider(p *AWSProvider, component string) error
func ValidateBackend ¶ added in v0.43.0
ValidateBackend will check the resolved configuration for a backend and return any errors it finds
Types ¶
type AWSProvider ¶
type AWSProvider struct { // the aws provider is optional (above) but if supplied you must set account id and region AccountID *json.Number `yaml:"account_id,omitempty"` AdditionalRegions []string `yaml:"additional_regions,omitempty"` Profile *string `yaml:"profile,omitempty"` Region *string `yaml:"region,omitempty"` Role *string `yaml:"role,omitempty"` // FIXME validate format Version *string `yaml:"version,omitempty"` }
func ResolveAWSProvider ¶ added in v0.21.0
func ResolveAWSProvider(commons ...Common) *AWSProvider
ResolveAWSProvider will return an AWSProvder iff one of the required fields is set somewhere in the set of Common config objects passed in. Otherwise it will return nil.
type Backend ¶
type Backend struct { Kind *string `yaml:"kind,omitempty" validate:"omitempty,oneof=s3 remote"` // fields used for S3 backend AccountID *string `yaml:"account_id,omitempty"` Bucket *string `yaml:"bucket,omitempty"` DynamoTable *string `yaml:"dynamodb_table,omitempty"` Profile *string `yaml:"profile,omitempty"` Region *string `yaml:"region,omitempty"` Role *string `yaml:"role,omitempty"` // fields used for remote backend HostName *string `yaml:"host_name,omitempty"` Organization *string `yaml:"organization,omitempty"` }
Backend is used to configure a terraform backend
func ResolveBackend ¶ added in v0.43.0
ResolveBackend returns the Backend configuration for a given component, after applying all inheritance rules
type BlessProvider ¶ added in v0.22.0
type BlessProvider struct { // the bless provider is optional (above) but if supplied you must set a region and aws_profile AdditionalRegions []string `yaml:"additional_regions,omitempty"` AWSProfile *string `yaml:"aws_profile,omitempty"` AWSRegion *string `yaml:"aws_region,omitempty"` RoleArn *string `yaml:"role_arn,omitempty"` Version *string `yaml:"version,omitempty"` }
BlessProvider allows for terraform-provider-bless configuration
func ResolveBlessProvider ¶ added in v0.22.0
func ResolveBlessProvider(commons ...Common) *BlessProvider
func (*BlessProvider) Validate ¶ added in v0.23.0
func (p *BlessProvider) Validate(component string) error
type CIProviderConfig ¶ added in v0.41.0
type CIProviderConfig struct {
Disabled bool `yaml:"disabled,omitempty"`
}
type CircleCI ¶ added in v0.35.0
type CircleCI struct { CommonCI `yaml:",inline"` SSHKeyFingerprints []string `yaml:"ssh_key_fingerprints"` }
func ResolveCircleCI ¶ added in v0.35.0
type Common ¶
type Common struct { Backend *Backend `yaml:"backend,omitempty"` ExtraVars map[string]string `yaml:"extra_vars,omitempty"` Owner *string `yaml:"owner,omitempty"` Project *string `yaml:"project,omitempty"` Providers *Providers `yaml:"providers,omitempty"` TerraformVersion *string `yaml:"terraform_version,omitempty"` Tools *Tools `yaml:"tools,omitempty"` }
type CommonCI ¶ added in v0.41.0
type CommonCI struct { Enabled *bool `yaml:"enabled,omitempty"` AWSIAMRoleName *string `yaml:"aws_iam_role_name,omitempty"` TestBuckets *int `yaml:"test_buckets,omitempty"` Command *string `yaml:"command,omitempty"` Buildevents *bool `yaml:"buildevents,omitempty"` Providers map[string]CIProviderConfig `yaml:"providers,omitempty"` }
type CommonProvider ¶ added in v0.44.0
type CommonProvider struct { Enabled *bool `yaml:"enabled,omitempty"` Version *string `yaml:"version,omitempty"` }
CommonProvider encapsulates common properties across providers TODO refactor other providers to use CommonProvider inline
type Component ¶
type Component struct { Common `yaml:",inline"` EKS *EKSConfig `yaml:"eks,omitempty"` Kind *ComponentKind `yaml:"kind,omitempty"` ModuleSource *string `yaml:"module_source,omitempty"` ModuleName *string `yaml:"module_name,omitempty"` }
type ComponentKind ¶ added in v0.41.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.41.0
func (ck *ComponentKind) GetOrDefault() ComponentKind
GetOrDefault gets the component kind or default
type Config ¶
type Config struct { Accounts map[string]Account `yaml:"accounts,omitempty"` Defaults Defaults `yaml:"defaults" validate:"required"` Docker bool `yaml:"docker,omitempty"` Envs map[string]Env `yaml:"envs,omitempty"` Global Component `yaml:"global,omitempty"` Modules map[string]Module `yaml:"modules,omitempty"` Plugins Plugins `yaml:"plugins,omitempty"` Version int `validate:"required,eq=2"` }
func ReadConfig ¶
ReadConfig take a byte array as input and outputs a json or yaml config struct
func (*Config) Generate ¶
Generate is used for test/quick integration. There are supposedly ways to do this without polluting the public api, but givent that fogg isn't an api, it doesn't seem like a big deal
func (*Config) ValidateAWSProviders ¶ added in v0.21.0
func (*Config) ValidateBackends ¶ added in v0.43.0
func (*Config) ValidateBlessProviders ¶ added in v0.22.0
func (*Config) ValidateOktaProviders ¶ added in v0.23.0
func (*Config) ValidateSnowflakeProviders ¶ added in v0.21.0
func (*Config) ValidateToolsTfLint ¶ added in v0.23.0
func (*Config) ValidateTravis ¶ added in v0.25.0
func (*Config) WalkComponents ¶ added in v0.21.0
type DatadogProvider ¶ added in v0.40.0
type DatadogProvider struct {
Version *string `yaml:"version,omitempty"`
}
func ResolveDatadogProvider ¶ added in v0.40.0
func ResolveDatadogProvider(commons ...Common) *DatadogProvider
type EKSConfig ¶ added in v0.41.0
type EKSConfig struct {
ClusterName string `yaml:"cluster_name"`
}
EKSConfig is the configuration for an eks cluster
type GitHubActionsCI ¶ added in v0.40.0
type GitHubActionsCI struct {
CommonCI `yaml:",inline"`
}
func ResolveGitHubActionsCI ¶ added in v0.40.0
func ResolveGitHubActionsCI(commons ...Common) *GitHubActionsCI
type GithubProvider ¶ added in v0.30.0
type GithubProvider struct { Organization *string `yaml:"organization,omitempty"` BaseURL *string `yaml:"base_url,omitempty"` Version *string `yaml:"version,omitempty"` }
func ResolveGithubProvider ¶ added in v0.30.0
func ResolveGithubProvider(commons ...Common) *GithubProvider
ResolveGithubProvider will return an GithubProvder iff one of the required fields is set somewhere in the set of Common config objects passed in. Otherwise it will return nil.
type HerokuProvider ¶ added in v0.37.0
type HerokuProvider struct {
Version *string `yaml:"version,omitempty"`
}
func ResolveHerokuProvider ¶ added in v0.37.0
func ResolveHerokuProvider(commons ...Common) *HerokuProvider
type Module ¶ added in v0.41.0
type Module struct {
TerraformVersion *string `yaml:"terraform_version,omitempty"`
}
Module is a module
type OktaProvider ¶ added in v0.23.0
type OktaProvider struct { // the okta provider is optional (above) but if supplied you must set an OrgName OrgName *string `yaml:"org_name,omitempty"` Version *string `yaml:"version,omitempty"` BaseURL *string `yaml:"base_url,omitempty"` }
OktaProvider is an okta provider
func ResolveOktaProvider ¶ added in v0.23.0
func ResolveOktaProvider(commons ...Common) *OktaProvider
func (*OktaProvider) Validate ¶ added in v0.23.0
func (o *OktaProvider) Validate(component string) error
type Plugins ¶ added in v0.41.0
type Plugins struct { CustomPlugins map[string]*plugins.CustomPlugin `yaml:"custom_plugins,omitempty"` TerraformProviders map[string]*plugins.CustomPlugin `yaml:"terraform_providers,omitempty"` }
Plugins contains configuration around plugins
type Providers ¶
type Providers struct { AWS *AWSProvider `yaml:"aws,omitempty"` Bless *BlessProvider `yaml:"bless,omitempty"` Github *GithubProvider `yaml:"github,omitempty"` Heroku *HerokuProvider `yaml:"heroku,omitempty"` Okta *OktaProvider `yaml:"okta,omitempty"` Snowflake *SnowflakeProvider `yaml:"snowflake,omitempty"` Datadog *DatadogProvider `yaml:"datadog,omitempty"` Tfe *TfeProvider `yaml:"tfe,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"` Version *string `yaml:"version,omitempty"` }
func ResolveSnowflakeProvider ¶ added in v0.21.0
func ResolveSnowflakeProvider(commons ...Common) *SnowflakeProvider
func (*SnowflakeProvider) Validate ¶ added in v0.23.0
func (p *SnowflakeProvider) Validate(component string) error
type TfLint ¶ added in v0.41.0
type TfLint struct {
Enabled *bool `yaml:"enabled,omitempty"`
}
func ResolveTfLint ¶ added in v0.23.0
type TfeProvider ¶ added in v0.44.0
type TfeProvider struct { CommonProvider `yaml:",inline"` Hostname *string `yaml:"hostname,omitempty"` }
func ResolveTfeProvider ¶ added in v0.44.0
func ResolveTfeProvider(commons ...Common) *TfeProvider