Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate pack #6 of datasources and resources to terraform plugin framework #903

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,5 @@ require (
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
)

replace github.com/PagerDuty/go-pagerduty => github.com/cjgajard/go-pagerduty v0.0.0-20240712203852-d83eacdec105
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder: drop this replace and update deps after PagerDuty/go-pagerduty gets updated.

4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
github.com/PagerDuty/go-pagerduty v1.8.1-0.20240524180345-9b652f07c450 h1:G8EOmgL7i+vO6hYAnjpVbPDqUpPY7ThF6NfasZntop0=
github.com/PagerDuty/go-pagerduty v1.8.1-0.20240524180345-9b652f07c450/go.mod h1:ilimTqwHSBjmvKeYA/yayDBZvzf/CX4Pwa9Qbhekzok=
github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c h1:kMFnB0vCcX7IL/m9Y5LO+KQYv+t1CQOiFe6+SV2J7bE=
github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo=
Expand All @@ -11,6 +9,8 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew
github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=
github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA=
github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
github.com/cjgajard/go-pagerduty v0.0.0-20240712203852-d83eacdec105 h1:794KlUOMDDRNJCbSqu8REHBrSY0x4ehJLZg0U1oN2AU=
github.com/cjgajard/go-pagerduty v0.0.0-20240712203852-d83eacdec105/go.mod h1:ilimTqwHSBjmvKeYA/yayDBZvzf/CX4Pwa9Qbhekzok=
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
Expand Down
155 changes: 0 additions & 155 deletions pagerduty/data_source_pagerduty_automation_actions_action.go

This file was deleted.

97 changes: 0 additions & 97 deletions pagerduty/data_source_pagerduty_automation_actions_runner.go

This file was deleted.

71 changes: 32 additions & 39 deletions pagerduty/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,51 +104,44 @@ func Provider(isMux bool) *schema.Provider {
"pagerduty_event_orchestration_integration": dataSourcePagerDutyEventOrchestrationIntegration(),
"pagerduty_event_orchestration_global_cache_variable": dataSourcePagerDutyEventOrchestrationGlobalCacheVariable(),
"pagerduty_event_orchestration_service_cache_variable": dataSourcePagerDutyEventOrchestrationServiceCacheVariable(),
"pagerduty_automation_actions_runner": dataSourcePagerDutyAutomationActionsRunner(),
"pagerduty_automation_actions_action": dataSourcePagerDutyAutomationActionsAction(),
"pagerduty_incident_workflow": dataSourcePagerDutyIncidentWorkflow(),
"pagerduty_incident_custom_field": dataSourcePagerDutyIncidentCustomField(),
"pagerduty_team_members": dataSourcePagerDutyTeamMembers(),
},

ResourcesMap: map[string]*schema.Resource{
"pagerduty_addon": resourcePagerDutyAddon(),
"pagerduty_escalation_policy": resourcePagerDutyEscalationPolicy(),
"pagerduty_maintenance_window": resourcePagerDutyMaintenanceWindow(),
"pagerduty_schedule": resourcePagerDutySchedule(),
"pagerduty_service": resourcePagerDutyService(),
"pagerduty_service_integration": resourcePagerDutyServiceIntegration(),
"pagerduty_team": resourcePagerDutyTeam(),
"pagerduty_team_membership": resourcePagerDutyTeamMembership(),
"pagerduty_user": resourcePagerDutyUser(),
"pagerduty_user_contact_method": resourcePagerDutyUserContactMethod(),
"pagerduty_user_notification_rule": resourcePagerDutyUserNotificationRule(),
"pagerduty_event_rule": resourcePagerDutyEventRule(),
"pagerduty_ruleset": resourcePagerDutyRuleset(),
"pagerduty_ruleset_rule": resourcePagerDutyRulesetRule(),
"pagerduty_business_service": resourcePagerDutyBusinessService(),
"pagerduty_response_play": resourcePagerDutyResponsePlay(),
"pagerduty_service_event_rule": resourcePagerDutyServiceEventRule(),
"pagerduty_slack_connection": resourcePagerDutySlackConnection(),
"pagerduty_business_service_subscriber": resourcePagerDutyBusinessServiceSubscriber(),
"pagerduty_webhook_subscription": resourcePagerDutyWebhookSubscription(),
"pagerduty_event_orchestration": resourcePagerDutyEventOrchestration(),
"pagerduty_event_orchestration_integration": resourcePagerDutyEventOrchestrationIntegration(),
"pagerduty_event_orchestration_global": resourcePagerDutyEventOrchestrationPathGlobal(),
"pagerduty_event_orchestration_router": resourcePagerDutyEventOrchestrationPathRouter(),
"pagerduty_event_orchestration_unrouted": resourcePagerDutyEventOrchestrationPathUnrouted(),
"pagerduty_event_orchestration_service": resourcePagerDutyEventOrchestrationPathService(),
"pagerduty_event_orchestration_global_cache_variable": resourcePagerDutyEventOrchestrationGlobalCacheVariable(),
"pagerduty_event_orchestration_service_cache_variable": resourcePagerDutyEventOrchestrationServiceCacheVariable(),
"pagerduty_automation_actions_runner": resourcePagerDutyAutomationActionsRunner(),
"pagerduty_automation_actions_action": resourcePagerDutyAutomationActionsAction(),
"pagerduty_automation_actions_action_team_association": resourcePagerDutyAutomationActionsActionTeamAssociation(),
"pagerduty_automation_actions_runner_team_association": resourcePagerDutyAutomationActionsRunnerTeamAssociation(),
"pagerduty_incident_workflow": resourcePagerDutyIncidentWorkflow(),
"pagerduty_incident_workflow_trigger": resourcePagerDutyIncidentWorkflowTrigger(),
"pagerduty_automation_actions_action_service_association": resourcePagerDutyAutomationActionsActionServiceAssociation(),
"pagerduty_incident_custom_field": resourcePagerDutyIncidentCustomField(),
"pagerduty_incident_custom_field_option": resourcePagerDutyIncidentCustomFieldOption(),
"pagerduty_addon": resourcePagerDutyAddon(),
"pagerduty_escalation_policy": resourcePagerDutyEscalationPolicy(),
"pagerduty_maintenance_window": resourcePagerDutyMaintenanceWindow(),
"pagerduty_schedule": resourcePagerDutySchedule(),
"pagerduty_service": resourcePagerDutyService(),
"pagerduty_service_integration": resourcePagerDutyServiceIntegration(),
"pagerduty_team": resourcePagerDutyTeam(),
"pagerduty_team_membership": resourcePagerDutyTeamMembership(),
"pagerduty_user": resourcePagerDutyUser(),
"pagerduty_user_contact_method": resourcePagerDutyUserContactMethod(),
"pagerduty_user_notification_rule": resourcePagerDutyUserNotificationRule(),
"pagerduty_event_rule": resourcePagerDutyEventRule(),
"pagerduty_ruleset": resourcePagerDutyRuleset(),
"pagerduty_ruleset_rule": resourcePagerDutyRulesetRule(),
"pagerduty_business_service": resourcePagerDutyBusinessService(),
"pagerduty_response_play": resourcePagerDutyResponsePlay(),
"pagerduty_service_event_rule": resourcePagerDutyServiceEventRule(),
"pagerduty_slack_connection": resourcePagerDutySlackConnection(),
"pagerduty_business_service_subscriber": resourcePagerDutyBusinessServiceSubscriber(),
"pagerduty_webhook_subscription": resourcePagerDutyWebhookSubscription(),
"pagerduty_event_orchestration": resourcePagerDutyEventOrchestration(),
"pagerduty_event_orchestration_integration": resourcePagerDutyEventOrchestrationIntegration(),
"pagerduty_event_orchestration_global": resourcePagerDutyEventOrchestrationPathGlobal(),
"pagerduty_event_orchestration_router": resourcePagerDutyEventOrchestrationPathRouter(),
"pagerduty_event_orchestration_unrouted": resourcePagerDutyEventOrchestrationPathUnrouted(),
"pagerduty_event_orchestration_service": resourcePagerDutyEventOrchestrationPathService(),
"pagerduty_event_orchestration_global_cache_variable": resourcePagerDutyEventOrchestrationGlobalCacheVariable(),
"pagerduty_event_orchestration_service_cache_variable": resourcePagerDutyEventOrchestrationServiceCacheVariable(),
"pagerduty_incident_workflow": resourcePagerDutyIncidentWorkflow(),
"pagerduty_incident_workflow_trigger": resourcePagerDutyIncidentWorkflowTrigger(),
"pagerduty_incident_custom_field": resourcePagerDutyIncidentCustomField(),
"pagerduty_incident_custom_field_option": resourcePagerDutyIncidentCustomFieldOption(),
},
}

Expand Down
1 change: 1 addition & 0 deletions pagerduty/resource_pagerduty_automation_actions_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/heimweh/go-pagerduty/pagerduty"
)

// Deprecated: Migrated to pagerdutyplugin.resourceAutomationActionsAction. Kept for testing.
func resourcePagerDutyAutomationActionsAction() *schema.Resource {
return &schema.Resource{
Create: resourcePagerDutyAutomationActionsActionCreate,
Expand Down
Loading
Loading