I am trying to run a simple command to assign an arm policy to a resource group.
My command to create the definitions works fine, and my assignment commands work fine when using a scubscription scope.
However, when I try to run the command I get the following error:
2017-06-26 18:28:59,248 - configuration.policyassignment - ERROR - The command failed, producing the following error: ERROR: The api-version '2016-04-01' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
The command I am trying to run is:
az policy assignment create --name permittedResourceTypes --policy netPermittedResourceTypes --scope /subscriptions/<sub id>/test-rg
ANy ideas what might be causing the error?