Thanks for pointing out the backend bug in the documentation, I’ve reported it to the Learn team.
On the second issue, the problem looks like you haven’t set up authentication from Terraform Cloud to Azure. When you log in locally using az login, this only works for local Terraform runs. When using the remote backend, you need to use Terraform Cloud workspace variables to authenticate.
That error sent me for a loop for nearly an entire work day. Tore apart various shell .*rc files and homebrew trying to figure out why a subshell seemingly had a different $PATH. Dumb luck I came across this post.
Can we get this output changed?
Error launching Azure CLI: exec: “az”: executable file not found in $PATH