Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot add role assignment to blob storage container #6221

Closed
sebader opened this issue Mar 23, 2020 · 2 comments
Closed

Cannot add role assignment to blob storage container #6221

sebader opened this issue Mar 23, 2020 · 2 comments

Comments

@sebader
Copy link
Contributor

sebader commented Mar 23, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Affected Resource(s)

  • azurerm_1.44.0

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

resource "azurerm_role_assignment" "data-contributor-role" {
  scope                = azurerm_storage_container.example.id
  role_definition_name = "Storage Blob Data Contributor"
  principal_id         = "xxxx"
}

Panic Output

Expected Behavior

I'm trying to add a role assignment to a blob storage container.
I'm not sure if this is a bug or not yet supported.

Actual Behavior

2020-03-23T13:06:37.6553053Z �[1m�[31mError: �[0m�[0m�[1mError loading Role Definition List: authorization.RoleDefinitionsClient#List: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="MissingSubscription" Message="The request did not have a subscription or a valid tenant level resource provider."�[0m

References

The request was discussed a while ago here:

@sebader
Copy link
Contributor Author

sebader commented Mar 27, 2020

Ah, I can just answer this myself as of today :) new provider version 2.3.0 enables this.
Fixed by: #6170

One just needs to now use resource_manager_id instead of id

resource "azurerm_role_assignment" "data-contributor-role" {
  scope                = azurerm_storage_container.example.resource_manager_id
  role_definition_name = "Storage Blob Data Contributor"
  principal_id         = "xxxx"
}

@sebader sebader closed this as completed Mar 27, 2020
@ghost
Copy link

ghost commented Apr 26, 2020

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 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant