Terraform-provider-azurerm: azurerm_role_definition.vm: authorization.RoleDefinitionsClient#CreateOrUpdate: Failure responding to request: StatusCode=400

Created on 26 Sep 2019  ·  5Comments  ·  Source: terraform-providers/terraform-provider-azurerm

Error:
"azurerm_role_definition.vm: authorization.RoleDefinitionsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidActionOrNotAction" Message="'Microsoft.Compute/hosts/delete' does not match any of the actions supported by the providers."
I'm performing the following rbac operation in terraform which is mentioned in the below azure documentation but ended up with the above error.
https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations
operations:
Microsoft.Compute/hosts/delete
Microsoft.Compute/hosts/read
Microsoft.Compute/hosts/write

question servicroles

All 5 comments

Hi @shankarsundaram, i think you've opened this in the wrong repository, as such i am going to move it to azure RM where i think it belongs.

The resource provider operations page does not list any of the operations you have posted, which means they do not exist, which is why you can not use them in a role definition.

hey @shankarsundaram

As @Variour has mentioned this appears to be down to the roles being requested which don't exist - from what I can tell it appears you're probably looking for Microsoft.Compute/virtualMachines/read? There may be roles in the pipeline for Dedicated Hosts but they're not listed on that page yet - but presumably when they become available they'll be in the format Microsoft.Compute/dedicatedHosts/read.

Since this should be resolved by switching to the correct role I'm going to close this issue for the moment, however I'd suggest reaching out to Microsoft Support if you're looking for further clarification about the roles in question.

Thanks!

These roles archived were already it seems. i found the correct one . Thanks for your comments @Variour @tombuildsstuff.

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

Was this page helpful?
0 / 5 - 0 ratings