Skip to content

Commit

Permalink
Add terraform state rm to incident types warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgajard committed Jan 13, 2025
1 parent b3e4124 commit dbcdeaf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pagerdutyplugin/resource_pagerduty_incident_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (r *resourceIncidentType) Update(ctx context.Context, req resource.UpdateRe
func (r *resourceIncidentType) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {
resp.Diagnostics.AddWarning(
"Cannot delete incident type",
"This action has no effect, and you might want to disable your incident type by changing it with `enabled = false`.",
"This action has no effect, and you might want to disable your incident type by changing it with `enabled = false`. If you want terraform to stop tracking this resource please use `terraform state rm`.",
)
}

Expand Down
1 change: 1 addition & 0 deletions website/docs/r/incident_type.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ incident, a major incident, or a fraud incident.
<div role="alert" class="alert alert-warning">
<div class="alert-title"><i class="fa fa-warning"></i>Resource limitation</div>
<p>Incident Types cannot be deleted, only disabled</p>
<p>If you want terraform to stop tracking this resource please use <code>terraform state rm</code>.</p>
</div>


Expand Down

0 comments on commit dbcdeaf

Please sign in to comment.