Skip to content

Commit fa94869

Browse files
authored
Merge pull request #5191 from mboersma/fix-aks-create-json-parsing
Fix aks-create when default az output isn't JSON
2 parents e3e3e30 + 02ad1f4 commit fa94869

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/aks-as-mgmt.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ create_aks_cluster() {
137137
echo "mgmt resource identity: ${AKS_MI_RESOURCE_ID}"
138138

139139
# save resource identity name and resource group
140-
MANAGED_IDENTITY_NAME=$(az identity show --ids "${AKS_MI_RESOURCE_ID}" | jq -r '.name')
140+
MANAGED_IDENTITY_NAME=$(az identity show --ids "${AKS_MI_RESOURCE_ID}" --output json | jq -r '.name')
141141
# export MANAGED_IDENTITY_NAME
142142
echo "mgmt resource identity name: ${MANAGED_IDENTITY_NAME}"
143143
USER_IDENTITY=$MANAGED_IDENTITY_NAME
144144
export USER_IDENTITY
145145

146-
MANAGED_IDENTITY_RG=$(az identity show --ids "${AKS_MI_RESOURCE_ID}" | jq -r '.resourceGroup')
146+
MANAGED_IDENTITY_RG=$(az identity show --ids "${AKS_MI_RESOURCE_ID}" --output json | jq -r '.resourceGroup')
147147
export MANAGED_IDENTITY_RG
148148
echo "mgmt resource identity resource group: ${MANAGED_IDENTITY_RG}"
149149

0 commit comments

Comments
 (0)