cloud-run-hello
cloud-run-hello copied to clipboard
feat: use metadata package
Description
Use of the metadata package to show users how to properly obtain the metadata of an instance in Cloud Run.
Note
Removal of the region part in favor of the zone part.
The region part is no longer part of the metadata package and API.
cc @steren @grayside
The original idea of this demo container was "no dependencies", and we preferred 20 lines to call metadata server that importing a package for that.
That being said, we then added some packages for cloudevents, so I'm fine with this change.
Also note that Cloud Run metadata server now returns the region directly (``/computeMetadata/v1/instance/region`, but I am not totally sure this is supported on GCE.