forfun
forfun

Reputation: 21

Cloud run failing to trigger cloudbuild webhook

I'm using cloudrun to make a post request to cloudbuild trigger through a webhook but I'm getting curl: (7) Failed to connect to cloudbuild.googleapis.com port 443: Connection timed out I've already tried requests and curl (through python) but none of them worked. When I tried it locally or using a VM it works fine.

My code:

import subprocess
import shlex
import json

header="Content-Type: application/json"
data=json.dumps('{"substitutions":{"_MODEL_DATE":"2022-06-27_12:00", "_TAG":"test"}}')
url="https://cloudbuild.googleapis.com/v1/projects/tdp-build-prod-6e0ca1/triggers/tdp-sandbox-vertex-training-build-image:webhook?key=xxxxxx&secret=xxxxxx"

gcp=f"curl -v -X POST -H {header} --data {data} {url}"

print(gcp)
subprocess.run(shlex.split(gcp))

Upvotes: 1

Views: 254

Answers (1)

forfun
forfun

Reputation: 21

There was a firewall denying egress access to the internet.

Upvotes: 1

Related Questions