Documentation ¶
Index ¶
- func AddAuthHeaders(apiKey string, req *http.Request)
- func AddNoAuthHeaders(req *http.Request)
- func CredentialsFilePath() string
- func IsFalsy(s string) bool
- func IsTruthy(s string) bool
- func RootDir() string
- func TraceID() string
- type Config
- type Credentials
- type CredentialsProfileSpec
- type Environment
- type Output
- type Projects
- type State
- type TerraformProject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAuthHeaders ¶ added in v0.7.11
func AddNoAuthHeaders ¶ added in v0.7.11
func CredentialsFilePath ¶ added in v0.7.17
func CredentialsFilePath() string
Types ¶
type Config ¶
type Config struct { Environment *Environment State *State Credentials Credentials Version string `yaml:"version,omitempty" ignored:"true"` LogLevel string `yaml:"log_level,omitempty" envconfig:"LOG_LEVEL"` NoColor bool `yaml:"no_color,omitempty" envconfig:"NO_COLOR"` SkipUpdateCheck bool `yaml:"skip_update_check,omitempty" envconfig:"SKIP_UPDATE_CHECK"` APIKey string `envconfig:"API_KEY"` PricingAPIEndpoint string `yaml:"pricing_api_endpoint,omitempty" envconfig:"PRICING_API_ENDPOINT"` DefaultPricingAPIEndpoint string `yaml:"default_pricing_api_endpoint,omitempty" envconfig:"DEFAULT_PRICING_API_ENDPOINT"` DashboardAPIEndpoint string `yaml:"dashboard_api_endpoint,omitempty" envconfig:"DASHBOARD_API_ENDPOINT"` Projects Projects `yaml:"projects" ignored:"true"` Outputs []*Output `yaml:"outputs" ignored:"true"` }
func DefaultConfig ¶ added in v0.7.17
func DefaultConfig() *Config
func (*Config) ConfigureLogger ¶ added in v0.7.17
func (*Config) LoadFromEnv ¶ added in v0.7.17
func (*Config) LoadFromFile ¶ added in v0.7.17
type Credentials ¶ added in v0.7.17
type Credentials map[string]CredentialsProfileSpec
func (Credentials) Save ¶ added in v0.7.17
func (c Credentials) Save() error
type CredentialsProfileSpec ¶ added in v0.7.17
type CredentialsProfileSpec struct {
APIKey string `yaml:"api_key"`
}
type Environment ¶ added in v0.7.11
type Environment struct { Version string `json:"version"` FullVersion string `json:"fullVersion"` IsTest bool `json:"isTest"` IsDev bool `json:"isDev"` InstallID string `json:"installId"` IsDefaultPricingAPIEndpoint bool `json:"isDefaultPricingAPIEndpoint"` OS string `json:"os"` CIPlatform string `json:"ciPlatform,omitempty"` CIScript string `json:"ciScript,omitempty"` Flags []string `json:"flags"` OutputFormat string `json:"outputFormat"` TerraformBinary string `json:"terraformBinary"` TerraformFullVersion string `json:"terraformFullVersion"` TerraformVersion string `json:"terraformVersion"` TerraformRemoteExecutionModeEnabled bool `json:"terraformRemoteExecutionModeEnabled"` TerraformInfracostProviderEnabled bool `json:"terraformInfracostProviderEnabled"` IsAWSChina bool `json:"isAwsChina"` HasConfigFile bool `json:"hasConfigFile"` HasUsageFile bool `json:"hasUsageFile"` }
func NewEnvironment ¶ added in v0.7.17
func NewEnvironment() *Environment
func (*Environment) SetOutputEnvironment ¶ added in v0.7.17
func (e *Environment) SetOutputEnvironment(outputCfg *Output)
func (*Environment) SetTerraformEnvironment ¶ added in v0.7.17
func (e *Environment) SetTerraformEnvironment(projectCfg *TerraformProject)
type Projects ¶ added in v0.7.17
type Projects struct {
Terraform []*TerraformProject `yaml:"terraform,omitempty"`
}
type State ¶ added in v0.7.17
type TerraformProject ¶ added in v0.7.17
type TerraformProject struct { Name string `yaml:"name,omitempty" ignored:"true"` Binary string `yaml:"binary,omitempty" envconfig:"TERRAFORM_BINARY"` Workspace string `yaml:"workspace,omitempty" envconfig:"TERRAFORM_WORKSPACE"` TerraformCloudHost string `yaml:"terraform_cloud_host,omitempty" envconfig:"TERRAFORM_CLOUD_HOST"` TerraformCloudToken string `yaml:"terraform_cloud_token,omitempty" envconfig:"TERRAFORM_CLOUD_TOKEN"` UsageFile string `yaml:"usage_file,omitempty" ignored:"true"` Dir string `yaml:"dir,omitempty" ignored:"true"` PlanFile string `yaml:"plan_file,omitempty" ignored:"true"` JSONFile string `yaml:"json_file,omitempty" ignored:"true"` PlanFlags string `yaml:"plan_flags,omitempty" ignored:"true"` UseState bool `yaml:"use_state,omitempty" ignored:"true"` }
Click to show internal directories.
Click to hide internal directories.