diff --git a/pagerduty/terraform_state_snapshot_helper.go b/pagerduty/terraform_state_snapshot_helper.go index 50f5144cc..1e4c0b0a7 100644 --- a/pagerduty/terraform_state_snapshot_helper.go +++ b/pagerduty/terraform_state_snapshot_helper.go @@ -29,7 +29,7 @@ func (state *tfStateSnapshot) GetResourceStateById(id string) *tfjson.StateResou return resourceState } for _, s := range state.State.Values.RootModule.Resources { - if s.AttributeValues["id"].(string) == id { + if resId, ok := s.AttributeValues["id"].(string); ok && resId == id { resourceState = s break }