The private key returned is not the same as the documentation
Jaafar-Nasrallah opened this issue · 2 comments
File: themes/default/content/registry/packages/gcp/api-docs/serviceAccount/key/_index.md
the documentation specifies the following
.
The issue is with :
This is what you normally get as a file when creating service account keys through the CLI or web console
It actually doesn't. it only returns the private_key
property of the JSON that is usually downloaded when creating a service account key.
I am not sure if this should be created here on in the pulumi repo. if I should act otherwise please advise
Hi @Jaafar-Nasrallah,
I had to code an apply in to make get the json output. Here is my line of code:
https://github.com/tusharshahrs/pulumi-home/blob/azure2/gcp-classic-ts-serviceaccount-key/index.ts#L21
This gets me the same thing when I create the key in the service account via the gcp console.
Let me know if that is what you were looking for.
@tusharshahrs OMG. I somehow assumed that the output was already in utf-8. the issue was an encoding thing. I am not an expert in encryption and keys. so I thought the output string was the content of the private key as a string. I already had been using an apply. The encoding step was the needed step