AWS SSM DoesNotExistException for missing Maintenance Window Target #16451
Labels
bug
Addresses a defect in current functionality.
service/ssm
Issues and PRs that pertain to the ssm service.
Milestone
Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Error: DoesNotExistException: Maintenance window mw-XXXX does not exist
Expected Behavior
After deleting all resources in our AWS Account via aws-nuke, I'd like to refresh the Terraform state to remove the deleted resources from the state as well. I expect that after running
terraform refresh
my state should be updated.Actual Behavior
terraform refresh
errors withError: DoesNotExistException: Maintenance window mw-XXXX does not exist
. This seems to be caused by theaws_ssm_maintenance_window_target
resource. When I manually remove it from the state viaterraform state rm aws_ssm_maintenance_window.default
and then run the refresh again, everything works fine.Steps to Reproduce
terraform apply
terraform refresh
Important Factoids
Nothing I know of.
References
Looks similar to the following issues:
The text was updated successfully, but these errors were encountered: