Documentation
¶
Overview ¶
Package gcpauth provides GCP Workload Identity Federation for simrun. When a GCP connector is configured with WIF, simrun generates an external account credential configuration that the Google Cloud SDK uses to exchange AWS credentials for GCP access tokens.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCredentialConfig ¶
BuildCredentialConfig generates a Google Cloud external account credential configuration JSON for AWS workload identity federation. The returned JSON can be set as GOOGLE_CREDENTIALS for the Google SDK to automatically exchange AWS credentials for GCP access tokens.
func BuildCredentialFile ¶
BuildCredentialFile writes the WIF credential config JSON to a temporary file and returns the file path. This is needed because the GCP SDK's ADC chain reads GOOGLE_APPLICATION_CREDENTIALS (a file path), not GOOGLE_CREDENTIALS (inline JSON which is Terraform-specific).