Skip to content

Conversation

meatballhat
Copy link
Contributor

This is a short-term hack that is not intended to be merged in current form. For more info, please holler at @meatballhat.

@meatballhat meatballhat self-assigned this Feb 13, 2019
meatballhat and others added 2 commits February 13, 2019 19:31
The GCE provider uses an ACCOUNT_JSON variable to fetch the credentials
for accessing the GCE API. This variable can either be a path to the
JSON or a string of the JSON. A similar implementation is used in
gcloud-cleanup.

In worker, the provider config is processed and all config variables are
'unescaped' as if it was a URL. This causes the JSON to become unusable,
mainly because the private key contains `+` symbols which get replaced
by spaces.

This solution simply checks if the key ends with ACCOUNT_JSON and skips
the 'unescape' step. This ensures backwards compatibility for any other
variables relying on this behavior. Ideally we should only run this step
when required, as in 'variable is a URL that needs unescaping'.
@meatballhat meatballhat removed their assignment Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants