mirror of
https://github.com/flatcar/scripts.git
synced 2025-12-01 07:22:11 +01:00
29 lines
653 B
Bash
29 lines
653 B
Bash
getAzureEnvironment() {
|
|
azure account show --json | \
|
|
jq '.[0].environmentName' --raw-output
|
|
}
|
|
|
|
getManagementEndpoint() {
|
|
azure account env show --environment=$(getAzureEnvironment) --json | \
|
|
jq '.managementEndpointUrl' --raw-output
|
|
}
|
|
|
|
getStorageEndpointPrefix() {
|
|
prefix=$(azure account env show --environment=$(getAzureEnvironment) --json | \
|
|
jq '.storageEndpointSuffix' --raw-output)
|
|
echo "${prefix##.}"
|
|
}
|
|
|
|
getBlobStorageEndpoint() {
|
|
echo "blob.$(getStorageEndpointPrefix)"
|
|
}
|
|
|
|
getSubscriptionId() {
|
|
azure account show --json | \
|
|
jq '.[0].id' --raw-output
|
|
}
|
|
|
|
getRegions() {
|
|
azure vm location list --json | jq '.[].name' --raw-output
|
|
}
|