ARTICLE AD BOX
I deployed the following app as a Google Cloud Run service:
package main import ( "io" "net/http" ) func main() { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { resp, err := http.Get("https://dummyjson.com/products") if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } io.Copy(w, resp.Body) }) http.ListenAndServe(":8080", nil) }I deployed the app as code (no Dockerfile):
gcloud run deploy app --quiet --source . --region us-east1When I navigate to the service, I see the following error:
Get "https://dummyjson.com/products": dial tcp: lookup dummyjson.com on [::1]:53: read udp [::1]:21264->[::1]:53: read: connection refused
This is the only service in my Google Cloud project. VPC Network is set to None. It's my understanding that Cloud Run services that are not part of a VPC should be able to make egress connections out of the box and without any special configuration.
Why is my outbound request being refused?
