0
votes

In Amazon AWS there is an option to fetch information about the instance you are on by making HTTP request to meta data like:

curl http://169.254.169.254/latest/meta-data/

Particularly if you need to know instance type you can use

curl http://169.254.169.254/latest/meta-data/instance-type

No special tools are required. Is there anything like AWS metadata at Google Compute Engine so that one can get instance info without specifying project/instance name?

1

1 Answers

1
votes

Yes, it's at: http://metadata.google.internal/computeMetadata/v1/

The specific key you'r looking for is at:

http://metadata.google.internal/computeMetadata/v1/instance/machine-type

See the docs here.