You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource"azurerm_resource_policy_exemption""myexemption" {
name="myexemption"display_name="Bypass for this resource"exemption_category="Waiver"policy_assignment_id=data.azurerm_policy_assignment.mypolicyassignment.idresource_id="/resourceId"
}
Debug Output/Panic Output
N/A
Expected Behaviour
Exemption should be recreated instead of being updated when the assignment changes.
If think making policy_assignment_id as ForceNew should not be a problem.
Actual Behaviour
Provider tried to update the exemption and Azure API prevents it (at least when the assignment has been deleted (and then recreated with a different id)) with this kind of error:
policy.ExemptionsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidPolicyAssignmentIdUpdate" Message="The policy exemption 'myexemption' update request is invalid. Cannot update the existing policy exemption's policy assignment 'previousAssignmentId' with new policy assignment 'newAssignmentId'."
Steps to Reproduce
N/A
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered:
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.
Is there an existing issue for this?
Community Note
Terraform Version
1.3.5
AzureRM Provider Version
3.32.0
Affected Resource(s)/Data Source(s)
azurerm_resource_policy_exemption, azurerm_resource_group_policy_exemption, azurerm_subscription_policy_exemption
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Exemption should be recreated instead of being updated when the assignment changes.
If think making
policy_assignment_id
as ForceNew should not be a problem.Actual Behaviour
Provider tried to update the exemption and Azure API prevents it (at least when the assignment has been deleted (and then recreated with a different id)) with this kind of error:
Steps to Reproduce
N/A
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: