Merge pull request #7260 from Murcurio/patch-1

Change GCP metadata url to FQDN
This commit is contained in:
Adrien Delorme 2019-02-01 14:44:33 +01:00 committed by GitHub
commit 55bfee509a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ const StartupScriptStatusNotDone string = "notdone"
var StartupScriptLinux string = fmt.Sprintf(`#!/usr/bin/env bash
echo "Packer startup script starting."
RETVAL=0
BASEMETADATAURL=http://metadata/computeMetadata/v1/instance/
BASEMETADATAURL=http://metadata.google.internal/computeMetadata/v1/instance/
GetMetadata () {
echo "$(curl -f -H "Metadata-Flavor: Google" ${BASEMETADATAURL}/${1} 2> /dev/null)"