I have a script in a VM that write data in a bucket in another project.
I want to schedule this script with Airflow but I have IAM access problem when the script need to write data:
AccessDeniedException: 403 148758369895-compute@developer.gserviceaccount.com does not have storage.objects.list access to ******
To launch the script I use the following command :
bash_command=' gcloud config set project project2 && gcloud compute --project "project1" ssh --zone "europe-west1-c" "VMname" --command="python script.py"',
If I want to launch the script with Google Cloud Shell, I need to use gcloud auth login but how can I do this with Airflow/Composer ??
I tried
bash_command='gcloud auth login && gcloud config set project project2 && gcloud compute --project "project1" ssh --zone "europe-west1-c" "VMname" --command="python script.py"',
without success