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

Support for delegatedManagedIdentityResourceId to azurerm_role_definition resource #9348

Closed
grayzu opened this issue Nov 16, 2020 · 6 comments · Fixed by #11848
Closed

Support for delegatedManagedIdentityResourceId to azurerm_role_definition resource #9348

grayzu opened this issue Nov 16, 2020 · 6 comments · Fixed by #11848
Labels
enhancement service/authorization upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR
Milestone

Comments

@grayzu
Copy link
Collaborator

grayzu commented Nov 16, 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

Description

Enable the Azure Lighthouse scenario described in this article with Terraform: Deploy a policy that can be remediated within a delegated subscription

In order to accomplish this, a new property has been added to role definitions in 2019-04-01-preview API. This property "delegatedManagedIdentityResourceId" is required for assigning roles in Azure Lighthouse. Update the azurerm_role_assignment resource to include the new property.

New or Affected Resource(s)

  • azurerm_role_assignment

Potential Terraform Configuration

resource "azurerm_role_assignment" "example" {
  scope                             = data.azurerm_subscription.primary.id
  role_definition_name              = "Reader"
  principal_id                      = data.azurerm_client_config.example.object_id
  delegated_managed_identity_id     = azurerm_user_assigned_identity.example.id
}
@grayzu
Copy link
Collaborator Author

grayzu commented Nov 16, 2020

Swagger PR (draft) that will enable Terraform to support this new property: Azure/azure-rest-api-specs#11510

@justin-ldn
Copy link

We are super keen to have this feature as we are blocked on use of Terraform through Lighthouse using this.

@mybayern1974 mybayern1974 added the upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR label Dec 21, 2020
@njuCZ
Copy link
Contributor

njuCZ commented Dec 21, 2020

delegatedManagedIdentityResourceId is a new field introduced in this PR Azure/azure-rest-api-specs#11506, however there is some problem in this PR which would cause go sdk generation failed. The service team has known this Issue and would fix it soon. For now it's blocked

@justin-ldn
Copy link

@njuCZ Thanks for explaining the dependency - is that work to resolve the issue with the merged PR above being tracked on GitHub?

@ghost
Copy link

ghost commented Jun 4, 2021

This has been released in version 2.62.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.62.0"
}
# ... other configuration ...

@github-actions
Copy link

github-actions bot commented Jul 5, 2021

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement service/authorization upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR
Projects
None yet
5 participants