Skip to content

Commit

Permalink
Merge pull request PagerDuty#847 from alenapan/ORCA-4708-delete-eo-in…
Browse files Browse the repository at this point in the history
…tegration-warning

Delete a non-actionable warning on the `pagerduty_event_orchestration_integration` resource
  • Loading branch information
imjaroiswebdev authored Apr 8, 2024
2 parents b65975d + ed044cd commit bf0e960
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions pagerduty/resource_pagerduty_event_orchestration_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"strings"
"time"

"github.com/hashicorp/go-cty/cty"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
Expand All @@ -26,9 +25,8 @@ func resourcePagerDutyEventOrchestrationIntegration() *schema.Resource {
},
Schema: map[string]*schema.Schema{
"event_orchestration": {
Type: schema.TypeString,
Required: true,
ValidateDiagFunc: addIntegrationMigrationWarning(),
Type: schema.TypeString,
Required: true,
},
"id": {
Type: schema.TypeString,
Expand Down Expand Up @@ -58,20 +56,6 @@ func resourcePagerDutyEventOrchestrationIntegration() *schema.Resource {
}
}

func addIntegrationMigrationWarning() schema.SchemaValidateDiagFunc {
return func(v interface{}, p cty.Path) diag.Diagnostics {
var diags diag.Diagnostics

diags = append(diags, diag.Diagnostic{
Severity: diag.Warning,
Summary: "Modifying the event_orchestration property of the 'pagerduty_event_orchestration_integration' resource will cause all future events sent with this integration's routing key to be evaluated against the new Event Orchestration.",
AttributePath: p,
})

return diags
}
}

func getEventOrchestrationIntegrationPayloadData(d *schema.ResourceData) (string, *pagerduty.EventOrchestrationIntegration) {
orchestrationId := d.Get("event_orchestration").(string)

Expand Down

0 comments on commit bf0e960

Please sign in to comment.