File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
docs/book/src/capi/providers
images/capi/packer/azure/scripts Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ These images are designed for use with [Cluster API Provider Azure]([Cluster API
77- An Azure account
88- The Azure CLI installed and configured
99- Set environment variables for ` AZURE_SUBSCRIPTION_ID ` , ` AZURE_CLIENT_ID ` , ` AZURE_CLIENT_SECRET `
10+ - Set optional environment variables ` RESOURCE_GROUP_NAME ` , ` STORAGE_ACCOUNT_NAME ` & ` AZURE_LOCATION ` to override the default values
1011
1112## Building Images
1213
Original file line number Diff line number Diff line change 55echo " Sign into Azure"
66tracestate=" $( shopt -po xtrace) "
77set +o xtrace
8- az login --service-principal -u ${AZURE_CLIENT_ID} -p ${AZURE_CLIENT_SECRET} --tenant ${AZURE_TENANT_ID} > /dev/null 2>&1
9- az account set -s ${AZURE_SUBSCRIPTION_ID} > /dev/null 2>&1
8+ az login --service-principal -u ${AZURE_CLIENT_ID} -p ${AZURE_CLIENT_SECRET} --tenant ${AZURE_TENANT_ID} > /dev/null 2>&1
9+ az account set -s ${AZURE_SUBSCRIPTION_ID} > /dev/null 2>&1
1010eval " $tracestate "
1111
1212echo " Create storage account"
@@ -15,7 +15,7 @@ export AZURE_LOCATION="${AZURE_LOCATION:-southcentralus}"
1515az group create -n ${RESOURCE_GROUP_NAME} -l ${AZURE_LOCATION} --tags ${TAGS:- }
1616CREATE_TIME=" $( date +%s) "
1717RANDOM_SUFFIX=" $( head /dev/urandom | LC_ALL=C tr -dc a-z | head -c 4 ; echo ' ' ) "
18- export STORAGE_ACCOUNT_NAME=" capi${CREATE_TIME}${RANDOM_SUFFIX} "
18+ export STORAGE_ACCOUNT_NAME=" ${STORAGE_ACCOUNT_NAME :- capi${CREATE_TIME}${RANDOM_SUFFIX} }"
1919az storage account check-name --name ${STORAGE_ACCOUNT_NAME}
2020az storage account create -n ${STORAGE_ACCOUNT_NAME} -g ${RESOURCE_GROUP_NAME}
2121
You can’t perform that action at this time.
0 commit comments