VM Metadata From Startup Script

attributes/created-by projects/761306993396/zones/us-west1-a/instanceGroupManagers/mydepl-my-instance-igm
attributes/instance-template projects/761306993396/global/instanceTemplates/mydepl-my-instance-it
attributes/startup-script #! /bin/bash
apt-get update
apt-get install -y apache2
HTML_START="<html><body><h1>VM Metadata From Startup Script</h1><pre>"
HTML_END="</pre></body></html>"
VM_METADATA=$(curl "http://metadata.google.internal/computeMetadata/v1/instance/?recursive=true&alt=text" -H "Metadata-Flavor: Google")
# Encode HTML characters
VM_METADATA=$(echo "$VM_METADATA"|sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g; s/"/\&quot;/g; s/'"'"'/\&#39;/g')
FILE_CONTENTS="$HTML_START$VM_METADATA$HTML_END"
echo "$FILE_CONTENTS" > /var/www/html/index.html

cpu-platform Intel Broadwell
description 
disks/0/device-name boot
disks/0/index 0
disks/0/mode READ_WRITE
disks/0/type PERSISTENT
hostname mydepl-my-instance-instance-2rdk.us-west1-a.c.intro2cloudcomputing15.internal
id 8446264472107455767
image projects/ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20190122a
licenses/0/id 1000201
machine-type projects/761306993396/machineTypes/n1-standard-1
maintenance-event NONE
name mydepl-my-instance-instance-2rdk
network-interfaces/0/access-configs/0/external-ip 35.230.126.168
network-interfaces/0/access-configs/0/type ONE_TO_ONE_NAT
network-interfaces/0/dns-servers 169.254.169.254
network-interfaces/0/gateway 10.138.0.1
network-interfaces/0/ip 10.138.0.27
network-interfaces/0/mac 42:01:0a:8a:00:1b
network-interfaces/0/mtu 1460
network-interfaces/0/network projects/761306993396/networks/default
network-interfaces/0/subnetmask 255.255.240.0
preempted FALSE
remaining-cpu-time -1
scheduling/automatic-restart TRUE
scheduling/on-host-maintenance MIGRATE
scheduling/preemptible FALSE
virtual-clock/drift-token 0
zone projects/761306993396/zones/us-west1-a