billions-cat-24200
08/27/2024, 8:11 PMdry-keyboard-94795
08/27/2024, 8:21 PMbillions-cat-24200
08/27/2024, 8:27 PMbillions-cat-24200
08/27/2024, 8:27 PMdry-keyboard-94795
08/27/2024, 8:30 PMgke-gcloud-auth-plugin
commandbillions-cat-24200
08/27/2024, 8:31 PMbillions-cat-24200
08/27/2024, 8:31 PMdry-keyboard-94795
08/27/2024, 8:36 PMgcloud auth application-default login
for local usedry-keyboard-94795
08/27/2024, 8:36 PMbillions-cat-24200
08/27/2024, 8:38 PMbillions-cat-24200
08/27/2024, 8:38 PMdry-keyboard-94795
08/27/2024, 8:38 PMbillions-cat-24200
08/27/2024, 8:42 PMGOOGLE_APPLICATION_CREDENTIALS
path. Before I import pulumi and providers and read from env and write that to disk:
# Load the GCP credentials from an env variable if available.
import configure_gcp_sdk # <--- here
import pulumi
import pulumi_gcp as gcp
billions-cat-24200
08/27/2024, 8:42 PMif os.getenv("GCP_CREDS_JSON_CREDS_BASE64"):
AUTH_FILE = "./gcp_service_account.json"
with open(AUTH_FILE, "w") as f:
json.dump(
json.loads(base64.b64decode(os.getenv("GCP_CREDS_JSON_CREDS_BASE64"))), f
)
billions-cat-24200
08/27/2024, 8:43 PMdry-keyboard-94795
08/27/2024, 8:44 PMbillions-cat-24200
08/27/2024, 8:45 PMGOOGLE_APPLICATION_CREDENTIALS=./gcp_service_account.json
billions-cat-24200
08/27/2024, 8:45 PMbillions-cat-24200
08/27/2024, 8:45 PMdry-keyboard-94795
08/27/2024, 8:46 PMbillions-cat-24200
08/27/2024, 8:48 PMbillions-cat-24200
08/27/2024, 8:49 PMbillions-cat-24200
08/27/2024, 8:50 PMbillions-cat-24200
08/27/2024, 8:52 PMdry-keyboard-94795
08/27/2024, 8:53 PMbillions-cat-24200
08/27/2024, 8:53 PMdry-keyboard-94795
08/27/2024, 8:54 PMdry-keyboard-94795
08/27/2024, 8:54 PMdry-keyboard-94795
08/27/2024, 8:56 PMbillions-cat-24200
08/27/2024, 8:57 PMgcp:credentials
billions-cat-24200
08/27/2024, 8:59 PMgcp:credentials
is set, I'd expect it to work. Your point is valid about the GOOGLE_APPLICATION_CREDENTIALS env var might work if there was an abs path, but it's pretty vague about what Pulumi does to configure both the box with those creds and how gke-gcloud-auth-plugin is loaded and configured too.dry-keyboard-94795
08/27/2024, 9:09 PMdry-keyboard-94795
08/27/2024, 9:10 PM