Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Config *Config CircleToken string VaultTokenFile string VaultClient *vault.Client TFCloudToken string EnableMetrics bool Metrics *Metrics SpaceliftClient *spacelift.Client }
App is the main application struct
type CircleCIConfig ¶
type CircleCIConfig struct { Name string `mapstructure:"name"` VaultRole *string `mapstructure:"vault_role"` VaultPolicies []string `mapstructure:"vault_policies"` }
CircleCIConfig represents a specific instance of a CircleCI project we want to update an environment variable for
type Config ¶
type Config struct { CircleCI []CircleCIConfig `mapstructure:"circleci"` TFCloud []TFCloudConfig `mapstructure:"tfcloud"` Spacelift []SpaceliftConfig `mapstructure:"spacelift"` // The address of the vault server to use when creating tokens VaultAddress string `mapstructure:"vault_address"` // The variable name to use when setting a vault token. Defaults to VAULT_ADDR TokenVariable string `mapstructure:"token_variable"` // If true, all tokens will be created with the orphan flag set to true OrphanTokens bool `mapstructure:"orphan_tokens"` // The TTL of the tokens that will be created. Defaults to 30 minutes TokenTTL time.Duration `mapstructure:"token_ttl"` // The interval at which the token will be refreshed. Defaults to 1 hour TokenRefreshInterval time.Duration `mapstructure:"token_refresh_interval"` }
Config represents the configuration file
type SpaceliftConfig ¶ added in v1.9.0
type SpaceliftConfig struct { // Stack is the name of a Spacelift stack that you want to inject vars into Stack string `mapstructure:"stack"` // VaultRole is the vault role to use for the token in this stack VaultRole *string `mapstructure:"vault_role"` // VaultPolicies is a list of policies that will be given to the token in this stack VaultPolicies []string `mapstructure:"vault_policies"` }
type TFCloudConfig ¶ added in v1.0.0
type TFCloudConfig struct { // Workspace is the ID of the workspace in tfcloud. Should begin with ws- and is required Workspace string `mapstructure:"workspace"` // Name is an optional field that can be used to identify a workspace Name string `mapstructure:"name"` // VaultRole is the vault role to use for the token in this workspace VaultRole *string `mapstructure:"vault_role"` // VaultPolicies is a list of policies that will be given to the token in this workspace VaultPolicies []string `mapstructure:"vault_policies"` }
TFCloudConfig represents a specific instance of a TFCloud workspace we want to update an environment variable for
Click to show internal directories.
Click to hide internal directories.