parameters

package
v0.62.0-rc.6 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package parameters implements parameters for profiles

Index

Constants

View Source
const (
	// PrivateKeyPathSuffix private ssh key path suffix
	PrivateKeyPathSuffix = "_private_key_path"
	// PublicKeyPathSuffix public ssh key path suffix
	PublicKeyPathSuffix = "_public_key_path"
	// PrivateKeyPasswordSuffix private ssh key password suffix
	PrivateKeyPasswordSuffix = "_private_key_password"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWS

type AWS struct {
	Account            string `yaml:"account"`
	KeyPairName        string `yaml:"keyPairName"`
	PublicKeyPath      string `yaml:"publicKeyPath"`
	PrivateKeyPath     string `yaml:"privateKeyPath"`
	PrivateKeyPassword string `yaml:"privateKeyPassword"`
	TeamTag            string `yaml:"teamTag"`
}

AWS instance contains AWS related parameters

type Agent

type Agent struct {
	APIKey              string `yaml:"apiKey"`
	APPKey              string `yaml:"appKey"`
	VerifyCodeSignature string `yaml:"verifyCodeSignature"`
}

Agent instance contains agent related parameters

type Azure added in v0.58.0

type Azure struct {
	Account            string `yaml:"account"`
	PublicKeyPath      string `yaml:"publicKeyPath"`
	PrivateKeyPath     string `yaml:"privateKeyPath"`
	PrivateKeyPassword string `yaml:"privateKeyPassword"`
}

Azure instance contains Azure related parameters

type CascadingValueStore

type CascadingValueStore struct {
	// contains filtered or unexported fields
}

CascadingValueStore instance contains an array of valueStore ordered by priority. Parameters in a cascading value store are looked up iterating through all value stores and return at first match

type Config

type Config struct {
	ConfigParams ConfigParams                 `yaml:"configParams"`
	StackParams  map[string]map[string]string `yaml:"stackParams"`
}

Config instance contains ConfigParams and StackParams

type ConfigParams

type ConfigParams struct {
	AWS       AWS    `yaml:"aws"`
	Azure     Azure  `yaml:"azure"`
	GCP       GCP    `yaml:"gcp"`
	Local     Local  `yaml:"local"`
	Agent     Agent  `yaml:"agent"`
	OutputDir string `yaml:"outputDir"`
	Pulumi    Pulumi `yaml:"pulumi"`
	DevMode   string `yaml:"devMode"`
}

ConfigParams instance contains config relayed parameters

type GCP added in v0.62.0

type GCP struct {
	Account            string `yaml:"account"`
	PublicKeyPath      string `yaml:"publicKeyPath"`
	PrivateKeyPath     string `yaml:"privateKeyPath"`
	PrivateKeyPassword string `yaml:"privateKeyPassword"`
}

GCP instance contains GCP related parameters

type Local added in v0.62.0

type Local struct {
	PublicKeyPath string `yaml:"publicKeyPath"`
}

Local instance contains local related parameters

type ParameterNotFoundError

type ParameterNotFoundError struct {
	// contains filtered or unexported fields
}

ParameterNotFoundError instance is an error related to a key not found in a valu store

func (ParameterNotFoundError) Error

func (e ParameterNotFoundError) Error() string

Error returns a printable ParameterNotFoundError

type Pulumi added in v0.52.0

type Pulumi struct {
	// Sets the log level for Pulumi operations
	// Be careful setting this value, as it can expose sensitive information in the logs.
	// https://www.pulumi.com/docs/support/troubleshooting/#verbose-logging
	LogLevel string `yaml:"logLevel"`
	// By default pulumi logs to /tmp, and creates symlinks to the most recent log, e.g. /tmp/pulumi.INFO
	// Set this option to true to log to stderr instead.
	// https://www.pulumi.com/docs/support/troubleshooting/#verbose-logging
	LogToStdErr string `yaml:"logToStdErr"`
	// To reduce logs noise in the CI, by default we display only the Pulumi error progress steam.
	// Set this option to true to display all the progress streams.
	VerboseProgressStreams string `yaml:"verboseProgressStreams"`
}

Pulumi instance contains pulumi related parameters

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store instance contains a valueStore

func NewAWSStore

func NewAWSStore(prefix string) Store

NewAWSStore creates a new AWS store

func NewCascadingStore

func NewCascadingStore(stores ...Store) Store

NewCascadingStore creates a new cascading store

func NewConfigFileStore

func NewConfigFileStore(path string) (Store, error)

NewConfigFileStore creates a store from configFileValueStore from a path

func NewEnvStore

func NewEnvStore(prefix string) Store

NewEnvStore creates a new store based on environment variables

func (Store) Get

func (s Store) Get(key StoreKey) (string, error)

Get returns a string value from the store

func (Store) GetBool

func (s Store) GetBool(key StoreKey) (bool, error)

GetBool returns a boolean value from the store

func (Store) GetBoolWithDefault

func (s Store) GetBoolWithDefault(key StoreKey, def bool) (bool, error)

GetBoolWithDefault returns a boolean value from the store with default on missing key

func (Store) GetInt added in v0.52.0

func (s Store) GetInt(key StoreKey) (int, error)

GetInt returns an integer value from the store

func (Store) GetIntWithDefault added in v0.52.0

func (s Store) GetIntWithDefault(key StoreKey, def int) (int, error)

GetIntWithDefault returns an integer value from the store with default on missing key

func (Store) GetWithDefault

func (s Store) GetWithDefault(key StoreKey, def string) (string, error)

GetWithDefault returns a string value from the store with default on missing key

type StoreKey

type StoreKey string

StoreKey alias to string

const (
	// APIKey Datadog api key
	APIKey StoreKey = "api_key"
	// APPKey Datadog app key
	APPKey StoreKey = "app_key"
	// Environments space-separated cloud environments
	Environments StoreKey = "env"
	// ExtraResourcesTags extra tags to label resources
	ExtraResourcesTags StoreKey = "extra_resources_tags"
	// KeyPairName aws keypairname, used to access EC2 instances
	KeyPairName StoreKey = "key_pair_name"
	// AWSPrivateKeyPassword private ssh key password
	AWSPrivateKeyPassword StoreKey = StoreKey(components.CloudProviderAWS + PrivateKeyPasswordSuffix)
	// AWSPrivateKeyPath private ssh key path
	AWSPrivateKeyPath StoreKey = StoreKey(components.CloudProviderAWS + PrivateKeyPathSuffix)
	// Profile aws profile name
	Profile StoreKey = "profile"
	// AWSPublicKeyPath public ssh key path
	AWSPublicKeyPath StoreKey = StoreKey(components.CloudProviderAWS + PublicKeyPathSuffix)
	//AzurePrivateKeyPassword private ssh key password
	AzurePrivateKeyPassword StoreKey = StoreKey(components.CloudProviderAzure + PrivateKeyPasswordSuffix)
	//AzurePrivateKeyPath private ssh key path
	AzurePrivateKeyPath StoreKey = StoreKey(components.CloudProviderAzure + PrivateKeyPathSuffix)
	//AzurePublicKeyPath public ssh key path
	AzurePublicKeyPath StoreKey = StoreKey(components.CloudProviderAzure + PublicKeyPathSuffix)
	//GCPPrivateKeyPassword private ssh key password
	GCPPrivateKeyPassword StoreKey = StoreKey(components.CloudProviderGCP + PrivateKeyPasswordSuffix)
	//GCPPrivateKeyPath private ssh key path
	GCPPrivateKeyPath StoreKey = StoreKey(components.CloudProviderGCP + PrivateKeyPathSuffix)
	//GCPPublicKeyPath public ssh key path
	GCPPublicKeyPath StoreKey = StoreKey(components.CloudProviderGCP + PublicKeyPathSuffix)
	// LocalPublicKeyPath public ssh key path
	LocalPublicKeyPath StoreKey = "local_public_key_path"
	// PulumiPassword config file parameter name
	PulumiPassword StoreKey = "pulumi_password"
	// SkipDeleteOnFailure keep the stack on test failure
	SkipDeleteOnFailure StoreKey = "skip_delete_on_failure"
	// StackParameters configuration map for the stack, in a json formatted string
	StackParameters StoreKey = "stack_params"
	// PipelineID  used to deploy agent artifacts from a Gitlab pipeline
	PipelineID StoreKey = "pipeline_id"
	// CommitSHA is used to deploy agent artifacts from a specific commit, needed for docker images
	CommitSHA StoreKey = "commit_sha"
	// VerifyCodeSignature of the agent
	VerifyCodeSignature StoreKey = "verify_code_signature"
	// OutputDir path to store test artifacts
	OutputDir StoreKey = "output_dir"
	// PulumiLogLevel sets the log level for pulumi. Pulumi emits logs at log levels between 1 and 11, with 11 being the most verbose.
	PulumiLogLevel StoreKey = "pulumi_log_level"
	// PulumiLogToStdErr specifies that all logs should be sent directly to stderr - making it more accessible and avoiding OS level buffering.
	PulumiLogToStdErr StoreKey = "pulumi_log_to_stderr"
	// PulumiVerboseProgressStreams allows specifying one or more io.Writers to redirect incremental update stdout
	PulumiVerboseProgressStreams StoreKey = "pulumi_verbose_progress_streams"
	// DevMode allows to keep the stack after the test completes
	DevMode StoreKey = "dev_mode"
	// InitOnly config flag parameter name
	InitOnly StoreKey = "init_only"
	// PreInitialized config flag parameter name
	PreInitialized StoreKey = "pre_initialized"
	// MajorVersion config flag parameter name
	MajorVersion StoreKey = "major_version"
)

Jump to

Keyboard shortcuts

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