[Bug]: aws_cloudwatch_log_account_policy not updating after first failed update #41036
Labels
bug
Addresses a defect in current functionality.
service/logs
Issues and PRs that pertain to the logs service.
Terraform Core Version
1.10.4
AWS Provider Version
5.84.0
Affected Resource(s)
aws_cloudwatch_log_account_policy
Expected Behavior
When an error occurs updating aws_cloudwatch_log_account_policy after changing its policy_document argument, next plan / apply should see that the resource needs updating.
Actual Behavior
After an error updating a aws_cloudwatch_log_account_policy resource, next plan / apply don't see that policy_document is not up to date, resulting in hidden drift with target infrastructure.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
First apply to create the resource:
Next applies to try to update the resource (will fail because of RoleThatDoesNotExist)
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
The same problem does not happen with an invalid selection_criteria, as this argument forces replacement => maybe adding
ForceNew: true
to policy_document is enough to fix this.References
Initially implemented in #38328
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: