-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_pim_active_role_assignment failing when the azurerm_role_definition is provisioned at a different subscription #22588
Comments
This is affecting both azurerm_pim_active_role_assignment and azurerm_pim_eligible_role_assignment. Role assignments are created and can be seen in Azure portal, but you will only get a successful message in Terraform when you provision the role assignment in the same subscription where the role definition is. I added timeouts block and it is still failing at 5m timeouts { |
I get the same error with or without the timeouts setting |
I'm seeing the same issue. PIM assignment is created, in my situation a subscription, but TF errors out waiting for Role Management Policy status to change. |
I'm getting the same issue as well with azurerm_pim_eligible_role_assignment. I did the same thing as @davidng1996 and added a timeouts block but it stuck at 5 minutes. Interestingly enough, if I import azurerm_pim_eligible_role_assignment following the required import naming convention, TF shows that it successfully imports the resource, but the resource doesn't show up in the state - if I run terraform state list it isn't listed, if I run tf plan or apply it wants to create the resource. I hate to sound mean but was any testing done on the azurerm_pim functionality in an actual Azure environment before it was added? Having it get announced as existing but not actually working is literally worse than not knowing it exists in the first place. |
Hmmm, I appreciate all your push for this 🍻 But I can not make it work and still get an error:
I cancelled manually after 5 minutes. The assignments are visible in the portal and created but the provider somehow can not read it back. Is that related or should I maybe open a new issue?
|
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.5.2
AzureRM Provider Version
3.65
Affected Resource(s)/Data Source(s)
azurerm_pim_active_role_assignment, azurerm_pim_eligible_role_assignment
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
No response
Actual Behaviour
Error: waiting for Role Management Policy: (Principal Id "<principal_id>" / Scope "/subscriptions/" / Role Definition Id "<data.azurerm_subscription.primary.id>/providers/Microsoft.Authorization/roleDefinitions/<role_definition_id>") to become found: timeout while waiting for state to become 'Found' (last state: 'Missing', timeout: 5m0s)
This error occurred when provisioning azurerm_pim_active_role_assignment in subscriptionID2, even though it is included in the assignable_scope. azurerm_pim_active_role_assignment in subscriptionID2 is created when I checked from Azure Portal
Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: