mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-15 15:42:06 +01:00
oem/azure: dynamically determine regions
Rather than keeping this list up-to-date, we should just publish everywhere we can.
This commit is contained in:
parent
f221bcf20e
commit
0cc64350da
@ -1,28 +1,3 @@
|
|||||||
REGIONS=(
|
|
||||||
"West Europe"
|
|
||||||
"North Europe"
|
|
||||||
"East Asia"
|
|
||||||
"Southeast Asia"
|
|
||||||
"East US"
|
|
||||||
"West US"
|
|
||||||
"Japan East"
|
|
||||||
"Japan West"
|
|
||||||
"Central US"
|
|
||||||
"East US 2"
|
|
||||||
"Brazil South"
|
|
||||||
"North Central US"
|
|
||||||
"South Central US"
|
|
||||||
"Australia East"
|
|
||||||
"Australia Southeast"
|
|
||||||
"Central India"
|
|
||||||
"West India"
|
|
||||||
"South India"
|
|
||||||
"Canada Central"
|
|
||||||
"Canada East"
|
|
||||||
"UK North"
|
|
||||||
"UK South 2"
|
|
||||||
)
|
|
||||||
|
|
||||||
getAzureEnvironment() {
|
getAzureEnvironment() {
|
||||||
azure account show --json | \
|
azure account show --json | \
|
||||||
jq '.[0].environmentName' --raw-output
|
jq '.[0].environmentName' --raw-output
|
||||||
@ -46,3 +21,7 @@ getSubscriptionId() {
|
|||||||
azure account show --json | \
|
azure account show --json | \
|
||||||
jq '.[0].id' --raw-output
|
jq '.[0].id' --raw-output
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getRegions() {
|
||||||
|
azure vm location list --json | jq '.[].name' --raw-output
|
||||||
|
}
|
||||||
|
|||||||
@ -27,7 +27,7 @@ fi
|
|||||||
|
|
||||||
requestBody="<ReplicationInput xmlns=\"http://schemas.microsoft.com/windowsazure\">
|
requestBody="<ReplicationInput xmlns=\"http://schemas.microsoft.com/windowsazure\">
|
||||||
<TargetLocations>"
|
<TargetLocations>"
|
||||||
for region in "${REGIONS[@]}"; do
|
for region in $(getRegions); do
|
||||||
requestBody+="\n\t\t<Region>$region</Region>"
|
requestBody+="\n\t\t<Region>$region</Region>"
|
||||||
done
|
done
|
||||||
requestBody+="
|
requestBody+="
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user