Hello Mike, the url you are querying is for the root of all metadata 
related to your project. If you SSH into your instance and run

curl -H "Metadata-Flavor: Google" 
http://metadata.google.internal/computeMetadata/v1/


you will get a directory listing which you can explore to find all metadata 
keys. As you can see the root directory doesn't contain your custom 
metadata keys, thus the 404 error is to be expected.

In your situation the right path is most 
likely 
http://metadata.google.internal/computeMetadata/v1/project/attributes/GOOGLE_CLIENT_ID

On Wednesday, September 20, 2017 at 12:18:57 PM UTC-4, Mike Hardy wrote:

> Hi, we're trying to set our GAE environment variables by getting the 
> secrets from the project-wide metadata, but we're getting a 404 not found 
> error. I can visually confirm that the project-wide metadata is set in the 
> compute engine section of the same project. What are we doing wrong here?
>
> *Command*
> wget -d --header="Metadata-Flavor: Google" http:
> //metadata.google.internal/computeMetadata/v1/GOOGLE_CLIENT_ID
>
> *Output*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *mhardy:~$ wget -d --header="Metadata-Flavor: Google" 
> http://metadata.google.internal/computeMetadata/v1/GOOGLE_CLIENT_IDSetting 
> --header (header) to Metadata-Flavor: GoogleDEBUG output created by Wget 
> 1.16 on linux-gnu.URI encoding = ‘UTF-8’--2017-09-20 09:13:38-- 
>  http://metadata.google.internal/computeMetadata/v1/GOOGLE_CLIENT_ID 
> <http://metadata.google.internal/computeMetadata/v1/GOOGLE_CLIENT_ID>Resolving
>  
> metadata.google.internal (metadata.google.internal)... IPCaching 
> metadata.google.internal => IPConnecting to metadata.google.internal 
> (metadata.google.internal)|IP|:80... connected.Created socket 4.Releasing 
> 0x00000000020b0a40 (new refcount 1).---request begin------request 
> begin---GET /computeMetadata/v1/GOOGLE_CLIENT_ID HTTP/1.1User-Agent: 
> Wget/1.16 (linux-gnu)Accept: */*Host: metadata.google.internalConnection: 
> Keep-AliveMetadata-Flavor: Google---request end---HTTP request sent, 
> awaiting response...---response begin---HTTP/1.0 404 Not FoundServer: 
> BaseHTTP/0.3 Python/2.7.9Date: Wed, 20 Sep 2017 16:13:39 GMTContent-Type: 
> text/html; charset=UTF-8Metadata-Flavor: Google---response end---404 Not 
> FoundRegistered socket 4 for persistent reuse.URI content encoding = 
> ‘UTF-8’] done.2017-09-20 09:13:39 ERROR 404: Not Found.*
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/4a716d36-5961-4332-b2bd-936ff44f9ff5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine... Mike Hardy
    • [google-appe... 'Yannick (Cloud Platform Support)' via Google App Engine

Reply via email to