straight-tailor-56799
05/25/2021, 11:04 PMsubprocess.Popen
. This shell script does gcloud auth
, pulumi login
and pulumi new
back in the python application I am trying to use pulumi auto and its complaining about missing google credentials. Note: I am using google storage as my managed backend… Am I doing anything fundamentally wrong ? how to address this ? I want my python application (using Flask) to create and destroy stacks using pulumi auto (using my gs backend url)clever-sunset-76585
05/26/2021, 12:13 AMsubprocess.Popen
essentially runs your shell script in its own shell process. I don’t know much about `gcloud auth`If gcloud auth
is simply setting env vars, that won’t work with triggering Pulumi commands via automation SDK in Python since Pulumi won’t “see” those environment vars. You will have to find a way to set authentication context that persists beyond just the shell script’s environment and is available/accessible in the Python venv
when Pulumi runs as well.straight-tailor-56799
05/26/2021, 3:28 AMcode: 255 stdout: stderr: error: missing google credentials
clever-sunset-76585
05/26/2021, 2:56 PMWhat I am unable to find anywhere in the documents is what should be the value of theThat should be your Pulumi account’s access token. Is yourif I use my own managed backend. I am not sure what values I should even set for thisPULUMI_ACCESS_TOKEN
BACKEND_URL
self-managed, or are you using our service (<https://api.pulumi.com>
)? You can access the Access Tokens page for your Pulumi account by going to https://app.pulumi.com/account/tokensstraight-tailor-56799
05/26/2021, 4:01 PMclever-sunset-76585
05/26/2021, 4:59 PMmy backend url is self managed, its a gcp bucket
what would be the access token for self managed backend ?Ah yes I see that you mentioned that in your original message. There is no need for a Pulumi access token for self-managed backends. The issue here is that your Pulumi does not “see” the Google credentials you are setting via
subprocess.Popen
as I mentioned here https://pulumi-community.slack.com/archives/C01PF3E1B8V/p1621988033086700?thread_ts=1621983858.086600&cid=C01PF3E1B8Vstraight-tailor-56799
05/29/2021, 9:43 PM