4,601 questions
0
votes
0
answers
30
views
Postgres: psql login with gcloud auth and zsh throwing an error
The following works fine in bash:
PGPASSWORD=$(gcloud sql generate-login-token) psql -h xx.xxx.xx.xxx -U [email protected] --no-password dbname
It fails in my preferred shell zsh:
zsh: parse error near ...
0
votes
0
answers
22
views
Cannot deploy from github actions to gcloud
I'm trying to deploy a website for my friend to gcloud.
I can deploy it from my local machine with following commands:
gcloud artifacts repositories create <repo_name> \
--repository-format=...
0
votes
1
answer
34
views
How to get all projects in Cloud Functions?
When I run the following code in Cloud Functions, I can only get the current project.
from google.cloud import resourcemanager_v3
client = resourcemanager_v3.ProjectsClient()
# Search ...
0
votes
0
answers
22
views
Issue with "Invalid Array Length" Error When Uploading Large Videos Using YouTube API v3
I am attempting to upload videos to YouTube via the YouTube API v3 from my Flutter web application. The upload process works as expected for smaller videos, but when attempting to upload a larger ...
0
votes
1
answer
33
views
How can I restrict permission of a service account in Google Cloud Platform?
How can I restrict a service account to, for example, Places Autocomplete (Google Maps API)?
I find GCP permissions really confusing, and I wonder if it is even possible to configure them the way I ...
0
votes
1
answer
63
views
Is it possible to install the Google Cloud CLI on alpine Linux Without it installing a bundled version of python?
Problem Background
I am building an Alpine Linux docker image to use as a (relatively) lightweight CI image. In this image, I need to have the Google Cloud gcloud CLI installed.
I am installing Python ...
0
votes
0
answers
60
views
Java client does not retrieve unacked messages from GCP Pub/Sub topic
I have a Spring Boot client configured with
spring:
cloud:
gcp:
pubsub:
publisher:
enable-message-ordering: true
subscriber:
flow-control:
...
0
votes
1
answer
33
views
How to access the Google Analytics Data API via bash script using gcloud
On a Ubuntu server I want to regularly execute a script which calls the Google Analytics Data API in order to extract the 20 most visited pages of a website.
I have successfully installed the gcloud ...
0
votes
0
answers
21
views
Why does my Puppeteer throw all sort of errors on Gcloud but work flawlessly on my local machine
I use Puppeteer to do simple text-scraping, it works flawlessly on my local machine, but when I deploy to GAE, it throws errors like navigation timeout, CONNECTION FAILED and sometimes it works.
Here ...
1
vote
1
answer
63
views
Google Cloud VMware engine vCenter password expiry
GCVE documentation says that vCenter passwords expire after 365 days after which it has to be reset using gcloud vmware private-clouds vcenter credentials reset command. Is there a way to know whether ...
0
votes
1
answer
45
views
The method `run_in_transaction` of Spanner client library for Python returned a message "Transaction is not begun."
After I obtain my authenticate key with gcloud CLI, I try to execute the below Python code to create a table in my instance of Spanner.
However, Spanner returned a message "Transaction is not ...
0
votes
1
answer
35
views
AccessDeniedException when trying to delete a file from Google Cloud Storage despite having Storage Admin role
I am facing an AccessDeniedException (403 Access Denied) when trying to delete a file from a Google Cloud Storage bucket. I have assigned the necessary permissions and roles (Storage Admin), but I ...
1
vote
1
answer
26
views
Spanner not executing query with params in python
I'm making an iterative query using spanner and python, what I do is paginating over the data using LIMIT and OFFSET, these parameters I pass it through the execute_sql method and the params parameter....
0
votes
0
answers
175
views
Make gemini-1.5-flash-002 accesible for my GCloud Run project
I am trying a basic script to summarize text:
def generate(self, text_to_summarize):
vertexai.init(project="<PROJECT_ID", location="MY_REGION")
model = GenerativeModel(
...
0
votes
1
answer
32
views
list all tags of docker image in GCP Artifact Registry
I want to list all image tags that i have in GCP Artifact Registry, because i have more than 100 tags and only up to 100 are shown in the UI.
I found this question, but it's about Container Registry ...
-1
votes
1
answer
66
views
Cloud Code extension for VS Code: How do I configure the "client-name" to avoid the error "Failed to deploy the app. Error: undefined"?
When I try to deploy using the UI, this is what's running in the background:
Running gcloud command: run deploy xxx --project xxx --image gcr.io/xxx/xxx --client-name Cloud Code for VS Code --client-...
0
votes
0
answers
62
views
auth/internal-error | Your application is authenticating by using local Application Default Credentials
During development, I am currently only setting GOOGLE_CLOUD_PROJECT=project-dev with my personal account [email protected] logged in with gcloud. [email protected] is also allowed to impersonate project-...
0
votes
0
answers
67
views
Unable to disable the readonly kubelet port in GKE
I've tried to follow this guide in accordance with the email that we have received about the unsecure readonly port exposed by kubelet.
The script I used is pasted below:
#!/bin/bash
echo Please ...
0
votes
1
answer
281
views
Google Cloud Run deployments failing after updating to .NET 9
I am deploying my Blazor Server app via Google Cloud Run. But it has been failing since I updated my project to .NET 9. Do I need to make any specific settings on gCloud? The error I am getting is
The ...
0
votes
2
answers
101
views
Running gcloud from a pod in Kubernetes
I have a cronjob that uses a service account to assume an IAM role to auth to GCP account. However, I can't fully use the K8s service account for it for gcloud command.
apiVersion: v1
kind: ...
0
votes
0
answers
23
views
How to suppress all log output from gcloud for scripting
I am running the following command to reset the password for a Windows VM and get the results in JSON format:
gcloud compute reset-windows-password \
VM_NAME \
--project=PROJECT_ID \
--quiet \
...
0
votes
2
answers
99
views
Difference b/w JWT and the access token using gcloud gcloud auth activate-service-account --key-file and gcloud auth print-access-token
I don't have any idea about JWT and access token. currently I am using access token by generating thought the command line. after that I have moved that to 12 hours lifetime. now the picture is I want ...
0
votes
0
answers
87
views
ERROR: (gcloud.compute.instances.create) could not parse resource []
As a part of my task in the "The Basics of Google Cloud Compute" course, I am required to enter the following code on the shell:-
gcloud compute instances create backend \
--zone=$ZONE \
...
0
votes
0
answers
44
views
Cant create VM instance from artifact image via node sdk
I am trying to create a VM instance based on a artifact image which works fine in the console and creating VM instances works as well via the sdk even attaching the image works even tho this is no ...
0
votes
0
answers
60
views
How to aggregate Gcloud logs-based metric by custom time range?
I have a logs-based metric (counter) that is counting the amount of the logs per second, from a SpringBoot application running on a simple instance, I'd like to have the option to aggregate the chart ...
0
votes
0
answers
30
views
Backup Firestore not working with Github Actions Error 127
I have been using Github actions to backup firestore for the past year with no issues on a cron job that runs everyday but it recently started giving me an error. An error i don't understand.
name: ...
0
votes
1
answer
84
views
GCloud Local Server Setup (dev_appserver.py)
I've been trying to set the GCloud local development server up with php82 but is unsuccessful.
I've installed Google Cloud SDK version 496.0.0 (latest) and Python 3.9.5 but it return the following ...
1
vote
1
answer
73
views
How to use gcloud run deploy to specify a particular Dockerfile?
I have a directory that contains multiple Dockerfiles, such as api.Dockerfile and ui.Dockerfile. When using gcloud run deploy, I want to specify which Dockerfile should be used for building the ...
0
votes
1
answer
72
views
Gcloud app deploy golang error with private repo imports on Windows
So I have a Google App Engine Golang application I need to update. My code is located in a private repo, https://github.com/ThePiachu/TestGoPrivate . My app.yaml and so on are in https://github.com/...
0
votes
1
answer
132
views
Error while deploying gcloud update command for EventArc trigger on GCS bucket
I am getting the following error while running the command to update existing google cloud eventarc trigger for a Cloud Service application.
ERROR: (gcloud.eventarc.triggers.update) INVALID_ARGUMENT: ...
0
votes
1
answer
152
views
Permission denied for GCR.IO Image
I have just spent the better part of 2 days trying the following docker command to get a public image from Google Cloud Artefact Registery. This is supposed to be a public image and I am the owner on ...
0
votes
1
answer
126
views
How to use the Bigtable cbt CLI while connected to a VPN?
I am using the Bigtable cbt CLI locally to manage my Bigtable instances and tables. When doing this from my home network, I have no issues. When attempting to run commands while connected to a VPN (...
1
vote
1
answer
76
views
Creating Dataproc Cluster with public-ip-address using DataprocCreateClusterOperator in Airflow
I am trying to create a Dataproc Cluster in my GCP project within an Airflow DAG using the DataprocCreateClusterOperator. I am using the ClusterGenerator to generate the config for the cluster. ...
0
votes
1
answer
66
views
gcloud submit [Repository] error parsing HTTP 404 response body: invalid character '<' and shows error /blobs/uploads was not found on this server
When I run the following command
gcloud builds submit --config docker-build.yml
I get an error in the "error parsing HTTP 404 response body: invalid character '<' looking for beginning of ...
0
votes
1
answer
32
views
gcloud command output formatting with previous variables of the another gcloud command
I have:
var=$(gcloud compute instance-groups list-instances ig --region=europe-west1 --format="csv[no-heading](NAME)")
gcloud compute instance-groups describe ig --format="csv[no-...
0
votes
1
answer
64
views
Can't access gcloud compute, DatabaseError
While trying to connect to a google cloud compute instance via iap-tunnel, I get this error message:
ERROR: gcloud crashed (DatabaseError): file is not a database
I tried connecting from an ubuntu CLI ...
0
votes
1
answer
107
views
Grant service account access to a single cluster within a project
Use case
We have a test-only cluster that we want to use as part of a Github Actions pipeline. We want the pipeline to be able to do pretty much whatever it likes within the cluster - create/delete ...
0
votes
1
answer
62
views
GCP edit loadbalancer frontend using gcloud command line option
I have a requirement to update ssl policy of GCP internal load balancer frontend using gcloud. I cannot see the option. Could someone please help me with this.
My original requirement is to attach ssl ...
0
votes
1
answer
84
views
How to attach two instance schedules to one compute instance in Google Cloud?
I have a Compute Instance on Google Cloud which had an instance schedule attached which launched it on every Monday at 12:00. Then, I needed it to also launch every 1st day of the Month, in addition ...
0
votes
0
answers
46
views
(Re)-use Identity-Aware Proxy between browser and backend
I have an SPA served through my App Engines default service by defining a simple yaml/python based static file server.
runtime: python311
handlers:
- url: /
static_files: www/index.html
upload: ...
0
votes
0
answers
49
views
Gcloud: Deploying flask app from git repo failing with DEPRECATION: Python 2.7 error when installing requirement.txt
I have built a flask app with python version 3.9, and kept it in a github repo. It successfully runs on render.com. To learn Google App Engine, I cloned the repo, moved into the folder and tried ...
1
vote
2
answers
61
views
Is there float32 precision on Google TPU?
I plan to use Google TPUs for scientific numerical simulation (finite element analysis).
That said, do TPUs support float32 for computation? If the precision is too small its unsuitable for me.
There ...
0
votes
0
answers
35
views
Eventarc gcloud command returns error when specifying existing topic to use
i am creating an eventarc with gcloud and have existing topic i want to use (instead of eventarc creating new one and manage automatically)
the trigger will invoke a workflow when new files upload to ...
0
votes
1
answer
97
views
Correct use of gcloud --sort-by combined with --limit
I'm using Google Cloud KMS, and I try to get the latest version of a specific asymmetric key with gcloud cli (v492.0). It seems that the --limit flag doesn't take into account the sorting direction ...
0
votes
1
answer
467
views
gcloud SSL: CERTIFICATE_VERIFY_FAILED Error on SSH
I have installed google-cloud-sdk using binary on my MacBook M1. I just copied the package from official GCP site and add the path export PATH="/Users/ZSHAREE/google-cloud-sdk/bin:$PATH" to ...
0
votes
0
answers
18
views
Export one database and import it to another database in GCP using gcloud cli
In my cloud sql instance, I have many databases. I want to export one database (DB1) and import that to another database with different name (DB2) in the same instance.
Also, database DB2 is pre-...
0
votes
1
answer
148
views
problem passing arguments to `bq add-iam-policy-binding`
Why bq doesn't see my params? I run:
bq add-iam-policy-binding <PROJECT>:<DATASET>.<TABLE> \
--member='user:<EMAIL>' \
--role='roles/bigquery.dataViewer' \
--...
0
votes
1
answer
196
views
"Dataform encountered an error: Unexpected property "type", or property value type of "string" is incorrect." using @dataform/cli
I'm working on a Dataform project using the @dataform/cli (https://cloud.google.com/dataform/docs/use-dataform-cli) package. I want to run the dataform run --dry-run to check my final SQL. I every got ...
-1
votes
2
answers
82
views
gcloud cli command create eventarc errors
I tried to create eventarc trigger with gcloud cli, in order to specify path patterns. Following the documentation. https://cloud.google.com/sdk/gcloud/reference/eventarc/triggers/create#--destination-...
0
votes
0
answers
40
views
ERROR: (gcloud.access-context-manager.perimeters.update) Error parsing [perimeter]. The [perimeter] resource is not properly specified
I am trying to set up Products for an Apigee on Google Cloud and get the error Products were not loaded successfully. Error: no connections available from the Apigee connect agent(s): refer ...