azurerm_resource_policy_exemption/azurerm_resource_group_policy_exemption/azurerm_subscription_policy_exemption
- Mark policy_assignment_id
as ForceNew
#19674
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #19667
Per the error message mentioned in the original thread, it indicates API doesn't support to update policy_assignment_id. So the policy_assignment_id of azurerm_resource_policy_exemption, azurerm_resource_group_policy_exemption, azurerm_subscription_policy_exemption has to be added "ForceNew" attribute.
--- PASS: TestAccAzureRMResourceGroupPolicyExemption_basic (446.65s)
--- PASS: TestAccAzureRMResourceGroupPolicyExemption_complete (448.80s)
--- PASS: TestAccAzureRMResourceGroupPolicyExemption_update (685.40s)
--- PASS: TestAccAzureRMSubscriptionPolicyExemption_basic (363.55s)
--- PASS: TestAccAzureRMSubscriptionPolicyExemption_complete (368.06s)
--- PASS: TestAccAzureRMSubscriptionPolicyExemption_update (586.30s)
--- PASS: TestAccAzureRMResourcePolicyExemption_basic (496.47s)
--- PASS: TestAccAzureRMResourcePolicyExemption_complete (497.52s)
--- PASS: TestAccAzureRMResourcePolicyExemption_update (738.02s)