#!/usr/bin/env bash#set -x# Creates service principal with contributor role to your subscriptionSUBSCRIPTION_ID=$(azaccountshow--queryid-otsv)SP_NAME="firstContainerAppGitHubAction"az ad sp create-for-rbac --name $SP_NAME --role "contributor" --scopes "/subscriptions/$SUBSCRIPTION_ID" --sdk-auth --output json
servicePrincipalAppId=$(azadsplist--display-name $SP_NAME --query"[].appId"-otsv)az role assignment create --assignee $servicePrincipalAppId --role "User Access Administrator" --scopes "/subscriptions/$SUBSCRIPTION_ID"