credentials

package
v0.19.895 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchEnv

func FetchEnv(_ context.Context, cfg *Config) (map[string]string, error)

FetchEnv returns environment variables needed for Terraform to operate in a GCP project. When ImpersonateServiceAccount is set, GOOGLE_IMPERSONATE_SERVICE_ACCOUNT is exported so the Terraform google provider calls iamcredentials.generateAccessToken on demand and handles token refresh automatically — avoiding the 1-hour static-token expiry problem.

Types

type Config

type Config struct {
	ProjectID                 string `json:"project_id" temporaljson:"project_id"`
	Region                    string `json:"region" temporaljson:"region"`
	ImpersonateServiceAccount string `json:"impersonate_service_account,omitempty" temporaljson:"impersonate_service_account,omitempty"`
}

Jump to

Keyboard shortcuts

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