mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 05:56:58 +02:00
Merge pull request #557 from crawford/azure
oem/azure: fixes for new regions
This commit is contained in:
commit
a71d3af739
@ -9,12 +9,13 @@ getManagementEndpoint() {
|
||||
}
|
||||
|
||||
getStorageEndpointPrefix() {
|
||||
azure account env show --environment=$(getAzureEnvironment) --json | \
|
||||
jq '.storageEndpointSuffix' --raw-output
|
||||
prefix=$(azure account env show --environment=$(getAzureEnvironment) --json | \
|
||||
jq '.storageEndpointSuffix' --raw-output)
|
||||
echo "${prefix##.}"
|
||||
}
|
||||
|
||||
getBlobStorageEndpoint() {
|
||||
echo "blob$(getStorageEndpointPrefix)"
|
||||
echo "blob.$(getStorageEndpointPrefix)"
|
||||
}
|
||||
|
||||
getSubscriptionId() {
|
||||
|
@ -25,6 +25,7 @@ if [ -z $subscription_id ]; then
|
||||
subscription_id=$(getSubscriptionId)
|
||||
fi
|
||||
|
||||
IFS=$'\n'
|
||||
requestBody="<ReplicationInput xmlns=\"http://schemas.microsoft.com/windowsazure\">
|
||||
<TargetLocations>"
|
||||
for region in $(getRegions); do
|
||||
@ -38,6 +39,7 @@ requestBody+="
|
||||
<Version>${VERSION}</Version>
|
||||
</ComputeImageAttributes>
|
||||
</ReplicationInput>"
|
||||
unset IFS
|
||||
|
||||
url="$(getManagementEndpoint)/${subscription_id}/services/images/${image_name}/replicate"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user