Terraform reports that guardduty detector has been deleted
Relevant Error/Panic Output Snippet
Note: Objects have changed outside of Terraform
Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:
# aws_guardduty_detector.guardduty_detector has been deleted
- resource "aws_guardduty_detector" "guardduty_detector" {
- id = "82c3dc7921ec85e9323b4f6209cc6cd9" -> null
tags = {}
# (5 unchanged attributes hidden)
# (1 unchanged block hidden)
}
Guardduty detector can be created by terraform but then on subsequent terraform plan, it is reporting that the guardduty detector has been deleted outside of terraform. This is not the case. The detector can be removed from state, then imported successfully with the detector id. The issue still persists after the successful import.
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.4.5
AWS Provider Version
4.65.0
Affected Resource(s)
aws_guardduty_detector
Expected Behavior
Terraform detects deployed guardduty detector
Actual Behavior
Terraform reports that guardduty detector has been deleted
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Guardduty detector can be created by terraform but then on subsequent terraform plan, it is reporting that the guardduty detector has been deleted outside of terraform. This is not the case. The detector can be removed from state, then imported successfully with the detector id. The issue still persists after the successful import.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None