Documentation ¶
Index ¶
- Variables
- 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 DatabricksProviderVersionGetter(comm Common) *string
- func DatadogProviderVersionGetter(comm Common) *string
- func DependsOnAccountsGetter(comm Common) []string
- func DependsOnComponentsGetter(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 OktaProviderRegistryNamespaceGetter(comm Common) *string
- func OktaProviderRegistryNamespacegetter(comm Common) *string
- func OktaProviderVersionGetter(comm Common) *string
- func OpsGenieProviderVersionGetter(comm Common) *string
- func OwnerGetter(comm Common) *string
- func PagerdutyProviderVersionGetter(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 SentryProviderBaseURLGetter(comm Common) *string
- func SentryProviderVersionGetter(comm Common) *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 AssertProvider
- type Auth0Provider
- 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) PathToComponentType(path string) (componentInfo, error)
- func (c *Config) Validate() ([]string, error)
- func (c *Config) ValidateAWSProviders() error
- func (c *Config) ValidateBackends() error
- func (c *Config) ValidateBlessProviders() error
- func (c *Config) ValidateGithubActionsCI() 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))
- func (c *Config) Write(fs afero.Fs, path string) error
- type DatabricksProvider
- type DatadogProvider
- type Defaults
- type DependsOn
- type EKSConfig
- type Env
- type GitHubActionsCI
- type GithubProvider
- type GrafanaProvider
- type HerokuProvider
- type KubernetesProvider
- type Module
- type OktaProvider
- type OpsGenieProvider
- type PagerdutyProvider
- type Plugins
- type Providers
- type SentryProvider
- type SnowflakeProvider
- type TFE
- type TfLint
- type TfeProvider
- type Tools
- type TravisCI
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func BackendAccountIDGetter ¶ added in v0.43.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 DatabricksProviderVersionGetter ¶ added in v0.58.1
func DatadogProviderVersionGetter ¶ added in v0.43.0
func DependsOnAccountsGetter ¶ added in v0.50.0
func DependsOnComponentsGetter ¶ added in v0.50.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 OktaProviderRegistryNamespaceGetter ¶ added in v0.58.1
func OktaProviderRegistryNamespacegetter ¶ added in v0.56.0
func OktaProviderVersionGetter ¶ added in v0.23.0
func OpsGenieProviderVersionGetter ¶ added in v0.70.0
func OwnerGetter ¶ added in v0.21.0
func PagerdutyProviderVersionGetter ¶ added in v0.58.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 SentryProviderBaseURLGetter ¶ added in v0.56.0
func SentryProviderVersionGetter ¶ added in v0.56.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"` // HACK HACK(el): we can configure additional, aliased, AWS providers for other accounts // A map of alias_name to provider configuration AdditionalProviders map[string]*AWSProvider `yaml:"additional_providers,omitempty"` }
func ResolveAWSProvider ¶ added in v0.21.0
func ResolveAWSProvider(commons ...Common) *AWSProvider
ResolveAWSProvider will return an AWSProvder if one of the required fields is set somewhere in the set of Common config objects passed in. Otherwise it will return nil.
type AssertProvider ¶ added in v0.61.0
type AssertProvider struct {
Version *string `yaml:"version,omitempty"`
}
func ResolveAssertProvider ¶ added in v0.61.0
func ResolveAssertProvider(commons ...Common) *AssertProvider
type Auth0Provider ¶ added in v0.58.5
type Auth0Provider struct { Version *string `yaml:"version,omitempty"` Domain *string `yaml:"domain,omitempty"` Source *string `yaml:"source,omitempty"` }
Auth0Provider is the terraform provider for the Auth0 service.
func ResolveAuth0Provider ¶ added in v0.58.5
func ResolveAuth0Provider(commons ...Common) *Auth0Provider
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,omitempty"` }
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"` DependsOn *DependsOn `yaml:"depends_on,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"` Env map[string]string `yaml:"env,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 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 )
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"` 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"` TFE *TFE `yaml:"tfe,omitempty"` }
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) PathToComponentType ¶ added in v0.50.0
PathToComponentType given a path, return information about that component
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) ValidateGithubActionsCI ¶ added in v0.51.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 DatabricksProvider ¶ added in v0.58.1
type DatabricksProvider struct {
Version *string `yaml:"version,omitempty"`
}
func ResolveDatabricksProvider ¶ added in v0.58.1
func ResolveDatabricksProvider(commons ...Common) *DatabricksProvider
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"` SSHKeySecrets []string `yaml:"ssh_key_secrets"` }
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 GrafanaProvider ¶ added in v0.57.0
type GrafanaProvider struct {
CommonProvider `yaml:",inline"`
}
func ResolveGrafanaProvider ¶ added in v0.57.0
func ResolveGrafanaProvider(commons ...Common) *GrafanaProvider
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 KubernetesProvider ¶ added in v0.56.0
type KubernetesProvider struct {
CommonProvider `yaml:",inline"`
}
func ResolveKubernetesProvider ¶ added in v0.56.0
func ResolveKubernetesProvider(commons ...Common) *KubernetesProvider
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 { // TODO refactor to get these from CommonProvider Version *string `yaml:"version,omitempty"` RegistryNamespace *string `yaml:"registry_namespace"` // for forked providers OrgName *string `yaml:"org_name,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 OpsGenieProvider ¶ added in v0.70.0
type OpsGenieProvider struct {
Version *string `yaml:"version,omitempty"`
}
func ResolveOpsGenieProvider ¶ added in v0.70.0
func ResolveOpsGenieProvider(commons ...Common) *OpsGenieProvider
type PagerdutyProvider ¶ added in v0.58.0
type PagerdutyProvider struct {
Version *string `yaml:"version,omitempty"`
}
func ResolvePagerdutyProvider ¶ added in v0.58.0
func ResolvePagerdutyProvider(commons ...Common) *PagerdutyProvider
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 { Assert *AssertProvider `yaml:"assert,omitempty"` Auth0 *Auth0Provider `yaml:"auth0,omitempty"` AWS *AWSProvider `yaml:"aws,omitempty"` Bless *BlessProvider `yaml:"bless,omitempty"` Databricks *DatabricksProvider `yaml:"databricks,omitempty"` Datadog *DatadogProvider `yaml:"datadog,omitempty"` Github *GithubProvider `yaml:"github,omitempty"` Grafana *GrafanaProvider `yaml:"grafana,omitempty"` Heroku *HerokuProvider `yaml:"heroku,omitempty"` Kubernetes *KubernetesProvider `yaml:"kubernetes,omitempty"` Okta *OktaProvider `yaml:"okta,omitempty"` OpsGenie *OpsGenieProvider `yaml:"opsgenie,omitempty"` Pagerduty *PagerdutyProvider `yaml:"pagerduty,omitempty"` Sentry *SentryProvider `yaml:"sentry,omitempty"` Snowflake *SnowflakeProvider `yaml:"snowflake,omitempty"` Tfe *TfeProvider `yaml:"tfe,omitempty"` }
type SentryProvider ¶ added in v0.56.0
type SentryProvider struct { Version *string `yaml:"version,omitempty"` BaseURL *string `yaml:"base_url,omitempty"` }
func ResolveSentryProvider ¶ added in v0.56.0
func ResolveSentryProvider(commons ...Common) *SentryProvider
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 TFE ¶ added in v0.72.0
type TFE struct { Component `yaml:",inline"` ReadTeams *[]string `yaml:"read_teams,omitempty"` Branch *string `yaml:"branch,omitempty"` GithubOrg *string `yaml:"gh_org,omitempty"` GithubRepo *string `yaml:"gh_repo,omitempty"` TFEOrg string `yaml:"tfe_org,omitempty"` SSHKeyName *string `yaml:"ssh_key_name,omitempty"` ExcludedGithubRequiredChecks *[]string `yaml:"excluded_gh_required_checks,omitempty"` AdditionalGithubRequiredChecks *[]string `yaml:"additional_gh_required_checks,omitempty"` }
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