The problem was that I was passing the wrong variable `$resource_group` instead of `$rg_name`. I was confused as the az was giving me a message about the API, which doesn't make any sense.