Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClientOptions ¶
func GetClientOptions(opts AuthOptions) []option.ClientOption
GetClientOptions returns Google Cloud client options based on the provided authentication configuration. This function provides unified authentication handling across all Google Cloud services in Atmos.
Authentication precedence: 1. Explicit credentials (JSON content or file path) 2. Application Default Credentials (ADC) which automatically handles:
- GOOGLE_APPLICATION_CREDENTIALS environment variable
- Compute Engine metadata service
- Cloud Shell credentials
- gcloud user credentials (from `gcloud auth application-default login`)
- Workload Identity (in GKE)
func GetCredentialsFromBackend ¶
GetCredentialsFromBackend extracts credentials from a Terraform backend configuration. This is used by the GCS Terraform backend.
func GetCredentialsFromStore ¶
GetCredentialsFromStore extracts credentials from a store configuration. This is used by the Google Secret Manager store.
Types ¶
type AuthOptions ¶
type AuthOptions struct {
// Credentials can be either:
// - JSON content (if starts with "{")
// - File path to service account JSON file
// - Empty string to use Application Default Credentials (ADC)
Credentials string
}
AuthOptions contains configuration for Google Cloud authentication.