mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 14:06: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() {
|
getStorageEndpointPrefix() {
|
||||||
azure account env show --environment=$(getAzureEnvironment) --json | \
|
prefix=$(azure account env show --environment=$(getAzureEnvironment) --json | \
|
||||||
jq '.storageEndpointSuffix' --raw-output
|
jq '.storageEndpointSuffix' --raw-output)
|
||||||
|
echo "${prefix##.}"
|
||||||
}
|
}
|
||||||
|
|
||||||
getBlobStorageEndpoint() {
|
getBlobStorageEndpoint() {
|
||||||
echo "blob$(getStorageEndpointPrefix)"
|
echo "blob.$(getStorageEndpointPrefix)"
|
||||||
}
|
}
|
||||||
|
|
||||||
getSubscriptionId() {
|
getSubscriptionId() {
|
||||||
|
@ -25,6 +25,7 @@ if [ -z $subscription_id ]; then
|
|||||||
subscription_id=$(getSubscriptionId)
|
subscription_id=$(getSubscriptionId)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
IFS=$'\n'
|
||||||
requestBody="<ReplicationInput xmlns=\"http://schemas.microsoft.com/windowsazure\">
|
requestBody="<ReplicationInput xmlns=\"http://schemas.microsoft.com/windowsazure\">
|
||||||
<TargetLocations>"
|
<TargetLocations>"
|
||||||
for region in $(getRegions); do
|
for region in $(getRegions); do
|
||||||
@ -38,6 +39,7 @@ requestBody+="
|
|||||||
<Version>${VERSION}</Version>
|
<Version>${VERSION}</Version>
|
||||||
</ComputeImageAttributes>
|
</ComputeImageAttributes>
|
||||||
</ReplicationInput>"
|
</ReplicationInput>"
|
||||||
|
unset IFS
|
||||||
|
|
||||||
url="$(getManagementEndpoint)/${subscription_id}/services/images/${image_name}/replicate"
|
url="$(getManagementEndpoint)/${subscription_id}/services/images/${image_name}/replicate"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user