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 nº.4 of datasources and resources to terraform plugin framework #905

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions pagerduty/data_source_pagerduty_escalation_policy.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.dataSourceEscalationPolicy. Kept for testing purposes.
func dataSourcePagerDutyEscalationPolicy() *schema.Resource {
return &schema.Resource{
Read: dataSourcePagerDutyEscalationPolicyRead,
Expand Down
74 changes: 0 additions & 74 deletions pagerduty/data_source_pagerduty_schedule.go

This file was deleted.

99 changes: 0 additions & 99 deletions pagerduty/data_source_pagerduty_user.go

This file was deleted.

122 changes: 0 additions & 122 deletions pagerduty/data_source_pagerduty_users.go

This file was deleted.

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

// Deprecated: Migrated to pagerdutyplugin.resourceVendor. Kept for testing purposes.
func dataSourcePagerDutyVendor() *schema.Resource {
return &schema.Resource{
Read: dataSourcePagerDutyVendorRead,
Expand Down
21 changes: 10 additions & 11 deletions pagerduty/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,27 +87,24 @@ func Provider(isMux bool) *schema.Provider {

DataSourcesMap: map[string]*schema.Resource{
"pagerduty_escalation_policy": dataSourcePagerDutyEscalationPolicy(),
"pagerduty_schedule": dataSourcePagerDutySchedule(),
"pagerduty_user": dataSourcePagerDutyUser(),
"pagerduty_users": dataSourcePagerDutyUsers(),
"pagerduty_licenses": dataSourcePagerDutyLicenses(),
"pagerduty_user_contact_method": dataSourcePagerDutyUserContactMethod(),
"pagerduty_team": dataSourcePagerDutyTeam(),
"pagerduty_vendor": dataSourcePagerDutyVendor(),
"pagerduty_service": dataSourcePagerDutyService(),
"pagerduty_service_integration": dataSourcePagerDutyServiceIntegration(),
"pagerduty_automation_actions_action": dataSourcePagerDutyAutomationActionsAction(),
"pagerduty_automation_actions_runner": dataSourcePagerDutyAutomationActionsRunner(),
"pagerduty_business_service": dataSourcePagerDutyBusinessService(),
"pagerduty_priority": dataSourcePagerDutyPriority(),
"pagerduty_ruleset": dataSourcePagerDutyRuleset(),
"pagerduty_event_orchestration": dataSourcePagerDutyEventOrchestration(),
"pagerduty_event_orchestrations": dataSourcePagerDutyEventOrchestrations(),
"pagerduty_event_orchestration_integration": dataSourcePagerDutyEventOrchestrationIntegration(),
"pagerduty_event_orchestration_global_cache_variable": dataSourcePagerDutyEventOrchestrationGlobalCacheVariable(),
"pagerduty_event_orchestration_integration": dataSourcePagerDutyEventOrchestrationIntegration(),
"pagerduty_event_orchestration_service_cache_variable": dataSourcePagerDutyEventOrchestrationServiceCacheVariable(),
"pagerduty_automation_actions_runner": dataSourcePagerDutyAutomationActionsRunner(),
"pagerduty_automation_actions_action": dataSourcePagerDutyAutomationActionsAction(),
"pagerduty_incident_workflow": dataSourcePagerDutyIncidentWorkflow(),
"pagerduty_event_orchestrations": dataSourcePagerDutyEventOrchestrations(),
"pagerduty_incident_custom_field": dataSourcePagerDutyIncidentCustomField(),
"pagerduty_incident_workflow": dataSourcePagerDutyIncidentWorkflow(),
"pagerduty_priority": dataSourcePagerDutyPriority(),
"pagerduty_ruleset": dataSourcePagerDutyRuleset(),
"pagerduty_team_members": dataSourcePagerDutyTeamMembers(),
},

Expand All @@ -122,7 +119,6 @@ func Provider(isMux bool) *schema.Provider {
"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(),
Expand Down Expand Up @@ -154,14 +150,17 @@ func Provider(isMux bool) *schema.Provider {

if isMux {
delete(p.DataSourcesMap, "pagerduty_business_service")
delete(p.DataSourcesMap, "pagerduty_escalation_policy")
delete(p.DataSourcesMap, "pagerduty_licenses")
delete(p.DataSourcesMap, "pagerduty_priority")
delete(p.DataSourcesMap, "pagerduty_service")
delete(p.DataSourcesMap, "pagerduty_service_integration")
delete(p.DataSourcesMap, "pagerduty_vendor")

delete(p.ResourcesMap, "pagerduty_addon")
delete(p.ResourcesMap, "pagerduty_business_service")
delete(p.ResourcesMap, "pagerduty_team")
delete(p.ResourcesMap, "pagerduty_team_membership")
}

p.ConfigureContextFunc = func(ctx context.Context, d *schema.ResourceData) (interface{}, diag.Diagnostics) {
Expand Down
Loading
Loading