Merge pull request #7260 from Murcurio/patch-1
Change GCP metadata url to FQDN
This commit is contained in:
commit
55bfee509a
|
@ -15,7 +15,7 @@ const StartupScriptStatusNotDone string = "notdone"
|
||||||
var StartupScriptLinux string = fmt.Sprintf(`#!/usr/bin/env bash
|
var StartupScriptLinux string = fmt.Sprintf(`#!/usr/bin/env bash
|
||||||
echo "Packer startup script starting."
|
echo "Packer startup script starting."
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
BASEMETADATAURL=http://metadata/computeMetadata/v1/instance/
|
BASEMETADATAURL=http://metadata.google.internal/computeMetadata/v1/instance/
|
||||||
|
|
||||||
GetMetadata () {
|
GetMetadata () {
|
||||||
echo "$(curl -f -H "Metadata-Flavor: Google" ${BASEMETADATAURL}/${1} 2> /dev/null)"
|
echo "$(curl -f -H "Metadata-Flavor: Google" ${BASEMETADATAURL}/${1} 2> /dev/null)"
|
||||||
|
|
Loading…
Reference in New Issue