0

I have a terraform setup that seems to only work part of the time, I get an error 403 and can't access resource manager API. What I don't understand is that I can use a simple terraform setup to create a resource group no issues.

I have the correct values for sub id, client id etc in my bash_profile already. It still will not work, anyone have a suggestion I could try without posting everything on here? Would be way too long.

Error message

* provider.azurerm: Unable to list provider registration status, it is possible that this is due to invalid credentials or the service principal does not have permission to use the Resource Manager API, Azure error: resources.ProvidersClient#List: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="AuthorizationFailed" Message="The client '23d07596-e522-4a16-a66c-d44cdcc4ab6d' with object id '23d07596-e522-4a16-a66c-d44cdcc4ab6d' does not have authorization to perform action 'Microsoft.Resources/subscriptions/providers/read' over scope '/subscriptions/d87ab958-58d1-4601-9713-fe56b3387f5c'."
  • As the log said: " Message="The client '23d07596-e522-4a16-a66c-d44cdcc4ab6d' with object id '23d07596-e522-4a16-a66c-d44cdcc4ab6d' does not have authorization to perform action 'Microsoft.Resources/subscriptions/providers/read' over scope '/subscriptions/d87ab958-58d1-4601-9713-fe56b3387f5c'." This is a permission issue on the account you're using, it is not allowed to read this subscription to gather its state. – Tensibai Nov 5 '18 at 9:28
  • @Tensibai which makes no sense since I am a contributor on that subscription so I should have full access to it. – Josh Kirby Nov 5 '18 at 15:13
  • I'm not familiar with azure access controls, but if I compare to AWS, you may ahve rights to write, read and delete elements in a SNS topic without the right to list the topic itself, according to the error I'd dig in this area... – Tensibai Nov 5 '18 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.