stackinputproviderconfig

package
v0.3.59 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateProviderConfig

func ValidateProviderConfig(
	provider cloudresourcekind.CloudResourceProvider,
	providerConfig *ProviderConfig,
	resourceName string,
) error

ValidateProviderConfig validates that the provider config has a path set for providers that require credentials.

Types

type ProviderConfig

type ProviderConfig struct {
	// Path is the path to the provider config file
	Path string
	// Provider is the provider type detected from the manifest
	Provider cloudresourcekind.CloudResourceProvider
}

ProviderConfig holds the provider configuration from the unified --provider-config flag.

func BuildFromProto

func BuildFromProto(
	credentialProto proto.Message,
	provider cloudresourcekind.CloudResourceProvider,
) (*ProviderConfig, func(), error)

BuildFromProto creates a ProviderConfig from a proto message by writing it to a temporary file. This is used by backend services that receive credentials via API rather than from a file. Returns the ProviderConfig, a cleanup function to remove the temp file, and any error.

func GetFromFlags

func GetFromFlags(
	commandFlagSet *pflag.FlagSet,
	detectionResult *providerdetect.DetectionResult,
) (*ProviderConfig, error)

GetFromFlags extracts the provider config path from CLI flags.

func GetFromFlagsSimple

func GetFromFlagsSimple(commandFlagSet *pflag.FlagSet) (*ProviderConfig, error)

GetFromFlagsSimple extracts the provider config path from CLI flags without detection. This is a convenience function for commands that don't perform provider detection.

Jump to

Keyboard shortcuts

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