Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

out_stackdriver: Don't overwrite ctx->client_email and ctx->private_key. #8093

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions plugins/out_stackdriver/stackdriver_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,13 @@ struct flb_stackdriver *flb_stackdriver_conf_create(struct flb_output_instance *
flb_stackdriver_conf_destroy(ctx);
return NULL;
}

/* Service Account Email */
if (ctx->client_email == NULL) {
tmp = getenv("SERVICE_ACCOUNT_EMAIL");
if (tmp) {
ctx->creds->client_email = flb_sds_create(tmp);
ctx->client_email = ctx->creds->client_email;
}
}

Expand All @@ -408,11 +409,9 @@ struct flb_stackdriver *flb_stackdriver_conf_create(struct flb_output_instance *
tmp = getenv("SERVICE_ACCOUNT_SECRET");
if (tmp) {
ctx->creds->private_key = flb_sds_create(tmp);
ctx->private_key = ctx->creds->private_key;
}
}

ctx->private_key = ctx->creds->private_key;
ctx->client_email = ctx->creds->client_email;
}

/*
Expand Down
Loading