Merge pull request #101170 from jeremyje/fixscopes
GCE Windows: Use authenticated HTTP GET against GCS if VM has cloud-p…
This commit is contained in:
@@ -295,7 +295,7 @@ function Check-StorageScope {
|
|||||||
While($true) {
|
While($true) {
|
||||||
$data = Get-InstanceMetadata -Key "service-accounts/default/scopes"
|
$data = Get-InstanceMetadata -Key "service-accounts/default/scopes"
|
||||||
if ($data) {
|
if ($data) {
|
||||||
return ($data -match "auth/devstorage")
|
return ($data -match "auth/devstorage") -or ($data -match "auth/cloud-platform")
|
||||||
}
|
}
|
||||||
Start-Sleep -Seconds 1
|
Start-Sleep -Seconds 1
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user