diff --git a/patches/0001-dummy-patch-to-support-submodule-for-module-import.patch b/patches/0001-dummy-patch-to-support-submodule-for-module-import.patch new file mode 100644 index 00000000..b3c53f4e --- /dev/null +++ b/patches/0001-dummy-patch-to-support-submodule-for-module-import.patch @@ -0,0 +1 @@ +This patch exists purely so that `patches` folder can be non-empty and the patches workflow can be invoked. See https://github.com/pulumi/pulumi-pagerduty/pull/546 for details. \ No newline at end of file diff --git a/patches/0001-fixup-update-CHANGELOG.md-v3.8.1.patch b/patches/0001-fixup-update-CHANGELOG.md-v3.8.1.patch deleted file mode 100644 index 627ef0c4..00000000 --- a/patches/0001-fixup-update-CHANGELOG.md-v3.8.1.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Venelin -Date: Fri, 10 May 2024 18:03:03 +0100 -Subject: [PATCH] fixup! update CHANGELOG.md v3.8.1 - - -diff --git a/go.mod b/go.mod -index 98a5fd37..a2c9b372 100644 ---- a/go.mod -+++ b/go.mod -@@ -1,4 +1,4 @@ --module github.com/PagerDuty/terraform-provider-pagerduty -+module github.com/PagerDuty/terraform-provider-pagerduty/v3 - - go 1.20 - -diff --git a/main.go b/main.go -index b8782ded..b57b09ba 100644 ---- a/main.go -+++ b/main.go -@@ -8,8 +8,8 @@ import ( - "github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server" - "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" - -- "github.com/PagerDuty/terraform-provider-pagerduty/pagerduty" -- pagerdutyplugin "github.com/PagerDuty/terraform-provider-pagerduty/pagerdutyplugin" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/pagerduty" -+ pagerdutyplugin "github.com/PagerDuty/terraform-provider-pagerduty/v3/pagerdutyplugin" - ) - - func main() { -diff --git a/pagerduty/util.go b/pagerduty/util.go -index 4b0dcc1e..923000cd 100644 ---- a/pagerduty/util.go -+++ b/pagerduty/util.go -@@ -6,8 +6,9 @@ package pagerduty - import ( - "time" - -- "github.com/PagerDuty/terraform-provider-pagerduty/util" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -+ -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - ) - - func timeToUTC(v string) (time.Time, error) { -diff --git a/pagerdutyplugin/config.go b/pagerdutyplugin/config.go -index 9fc588e0..a0f10f7e 100644 ---- a/pagerdutyplugin/config.go -+++ b/pagerdutyplugin/config.go -@@ -12,9 +12,10 @@ import ( - "time" - - "github.com/PagerDuty/go-pagerduty" -- "github.com/PagerDuty/terraform-provider-pagerduty/util" - "github.com/hashicorp/terraform-plugin-framework/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" -+ -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - ) - - // Config defines the configuration options for the PagerDuty client -diff --git a/pagerdutyplugin/provider_test.go b/pagerdutyplugin/provider_test.go -index f562e13b..eef50782 100644 ---- a/pagerdutyplugin/provider_test.go -+++ b/pagerdutyplugin/provider_test.go -@@ -6,13 +6,14 @@ import ( - "testing" - "time" - -- pd "github.com/PagerDuty/terraform-provider-pagerduty/pagerduty" - "github.com/PagerDuty/terraform-provider-pagerduty/util" - "github.com/hashicorp/terraform-plugin-framework/providerserver" - "github.com/hashicorp/terraform-plugin-go/tfprotov5" - "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" -+ -+ pd "github.com/PagerDuty/terraform-provider-pagerduty/v3/pagerduty" - ) - - var testAccProvider = New() diff --git a/patches/0002-versioned-util-package-for-more-resources.patch b/patches/0002-versioned-util-package-for-more-resources.patch deleted file mode 100644 index 1fae1159..00000000 --- a/patches/0002-versioned-util-package-for-more-resources.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: guineveresaenger -Date: Fri, 22 Mar 2024 10:23:37 -0700 -Subject: [PATCH] versioned util package for more resources - - -diff --git a/pagerduty/resource_pagerduty_schedule.go b/pagerduty/resource_pagerduty_schedule.go -index 11a75167..e3dedc0d 100644 ---- a/pagerduty/resource_pagerduty_schedule.go -+++ b/pagerduty/resource_pagerduty_schedule.go -@@ -9,7 +9,7 @@ import ( - "strings" - "time" - -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" -diff --git a/pagerduty/resource_pagerduty_service.go b/pagerduty/resource_pagerduty_service.go -index 3ae23fea..cf31dae8 100644 ---- a/pagerduty/resource_pagerduty_service.go -+++ b/pagerduty/resource_pagerduty_service.go -@@ -8,7 +8,7 @@ import ( - "strconv" - "time" - -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/go-cty/cty" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" -diff --git a/pagerduty/resource_pagerduty_user.go b/pagerduty/resource_pagerduty_user.go -index e96c5199..9347ef08 100644 ---- a/pagerduty/resource_pagerduty_user.go -+++ b/pagerduty/resource_pagerduty_user.go -@@ -7,7 +7,7 @@ import ( - "strings" - "time" - -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/heimweh/go-pagerduty/pagerduty" -diff --git a/pagerdutyplugin/data_source_pagerduty_business_service.go b/pagerdutyplugin/data_source_pagerduty_business_service.go -index 84e60d61..5a6ad3c4 100644 ---- a/pagerdutyplugin/data_source_pagerduty_business_service.go -+++ b/pagerdutyplugin/data_source_pagerduty_business_service.go -@@ -7,7 +7,7 @@ import ( - "time" - - "github.com/PagerDuty/go-pagerduty" -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-framework/datasource" - "github.com/hashicorp/terraform-plugin-framework/datasource/schema" - "github.com/hashicorp/terraform-plugin-framework/path" diff --git a/patches/0003-more-replaces.patch b/patches/0003-more-replaces.patch deleted file mode 100644 index 722d47e5..00000000 --- a/patches/0003-more-replaces.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Venelin -Date: Fri, 10 May 2024 18:16:24 +0100 -Subject: [PATCH] more replaces - - -diff --git a/pagerdutyplugin/data_source_pagerduty_extension_schema.go b/pagerdutyplugin/data_source_pagerduty_extension_schema.go -index 481e4194..f6001a07 100644 ---- a/pagerdutyplugin/data_source_pagerduty_extension_schema.go -+++ b/pagerdutyplugin/data_source_pagerduty_extension_schema.go -@@ -8,7 +8,7 @@ import ( - "time" - - "github.com/PagerDuty/go-pagerduty" -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-framework/datasource" - "github.com/hashicorp/terraform-plugin-framework/datasource/schema" - "github.com/hashicorp/terraform-plugin-framework/path" -diff --git a/pagerdutyplugin/data_source_pagerduty_tag.go b/pagerdutyplugin/data_source_pagerduty_tag.go -index b93a36c6..69d740bf 100644 ---- a/pagerdutyplugin/data_source_pagerduty_tag.go -+++ b/pagerdutyplugin/data_source_pagerduty_tag.go -@@ -7,7 +7,7 @@ import ( - "time" - - "github.com/PagerDuty/go-pagerduty" -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-framework/datasource" - "github.com/hashicorp/terraform-plugin-framework/datasource/schema" - "github.com/hashicorp/terraform-plugin-framework/path" -diff --git a/pagerdutyplugin/provider_test.go b/pagerdutyplugin/provider_test.go -index eef50782..8f217c5a 100644 ---- a/pagerdutyplugin/provider_test.go -+++ b/pagerdutyplugin/provider_test.go -@@ -6,7 +6,7 @@ import ( - "testing" - "time" - -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-framework/providerserver" - "github.com/hashicorp/terraform-plugin-go/tfprotov5" - "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" -diff --git a/pagerdutyplugin/resource_pagerduty_extension.go b/pagerdutyplugin/resource_pagerduty_extension.go -index ef2ac476..7a5dace5 100644 ---- a/pagerdutyplugin/resource_pagerduty_extension.go -+++ b/pagerdutyplugin/resource_pagerduty_extension.go -@@ -8,7 +8,7 @@ import ( - "time" - - "github.com/PagerDuty/go-pagerduty" -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-framework/attr" - "github.com/hashicorp/terraform-plugin-framework/diag" - "github.com/hashicorp/terraform-plugin-framework/path" -diff --git a/pagerdutyplugin/resource_pagerduty_extension_servicenow.go b/pagerdutyplugin/resource_pagerduty_extension_servicenow.go -index a5c8997e..0bb99573 100644 ---- a/pagerdutyplugin/resource_pagerduty_extension_servicenow.go -+++ b/pagerdutyplugin/resource_pagerduty_extension_servicenow.go -@@ -8,7 +8,7 @@ import ( - "time" - - "github.com/PagerDuty/go-pagerduty" -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" - "github.com/hashicorp/terraform-plugin-framework/attr" - "github.com/hashicorp/terraform-plugin-framework/diag" -diff --git a/pagerdutyplugin/resource_pagerduty_extension_test.go b/pagerdutyplugin/resource_pagerduty_extension_test.go -index 4c9cb8ee..eaee8b1d 100644 ---- a/pagerdutyplugin/resource_pagerduty_extension_test.go -+++ b/pagerdutyplugin/resource_pagerduty_extension_test.go -@@ -8,7 +8,7 @@ import ( - "testing" - - "github.com/PagerDuty/go-pagerduty" -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" -diff --git a/pagerdutyplugin/resource_pagerduty_tag.go b/pagerdutyplugin/resource_pagerduty_tag.go -index b1a9115e..14a955cc 100644 ---- a/pagerdutyplugin/resource_pagerduty_tag.go -+++ b/pagerdutyplugin/resource_pagerduty_tag.go -@@ -7,7 +7,7 @@ import ( - "time" - - "github.com/PagerDuty/go-pagerduty" -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-framework/path" - "github.com/hashicorp/terraform-plugin-framework/resource" - "github.com/hashicorp/terraform-plugin-framework/resource/schema" -diff --git a/pagerdutyplugin/resource_pagerduty_tag_assignment.go b/pagerdutyplugin/resource_pagerduty_tag_assignment.go -index cc8fcaf5..a0bf2e64 100644 ---- a/pagerdutyplugin/resource_pagerduty_tag_assignment.go -+++ b/pagerdutyplugin/resource_pagerduty_tag_assignment.go -@@ -8,7 +8,7 @@ import ( - "time" - - "github.com/PagerDuty/go-pagerduty" -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" - "github.com/hashicorp/terraform-plugin-framework/diag" - "github.com/hashicorp/terraform-plugin-framework/resource" diff --git a/patches/0004-more-replaces-3.patch b/patches/0004-more-replaces-3.patch deleted file mode 100644 index bd56b427..00000000 --- a/patches/0004-more-replaces-3.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Venelin -Date: Tue, 18 Jun 2024 23:46:39 +0300 -Subject: [PATCH] more replaces 3 - - -diff --git a/pagerdutyplugin/data_source_pagerduty_integration.go b/pagerdutyplugin/data_source_pagerduty_integration.go -index 05df72a6..80be0ac1 100644 ---- a/pagerdutyplugin/data_source_pagerduty_integration.go -+++ b/pagerdutyplugin/data_source_pagerduty_integration.go -@@ -8,7 +8,7 @@ import ( - "time" - - "github.com/PagerDuty/go-pagerduty" -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-framework/datasource" - "github.com/hashicorp/terraform-plugin-framework/datasource/schema" - "github.com/hashicorp/terraform-plugin-framework/diag" -diff --git a/pagerdutyplugin/data_source_pagerduty_service.go b/pagerdutyplugin/data_source_pagerduty_service.go -index 14748042..c60bc569 100644 ---- a/pagerdutyplugin/data_source_pagerduty_service.go -+++ b/pagerdutyplugin/data_source_pagerduty_service.go -@@ -6,7 +6,7 @@ import ( - "log" - - "github.com/PagerDuty/go-pagerduty" -- "github.com/PagerDuty/terraform-provider-pagerduty/util/apiutil" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util/apiutil" - "github.com/hashicorp/terraform-plugin-framework/attr" - "github.com/hashicorp/terraform-plugin-framework/datasource" - "github.com/hashicorp/terraform-plugin-framework/datasource/schema" -diff --git a/pagerdutyplugin/resource_pagerduty_addon.go b/pagerdutyplugin/resource_pagerduty_addon.go -index 70e0a881..82928ab8 100644 ---- a/pagerdutyplugin/resource_pagerduty_addon.go -+++ b/pagerdutyplugin/resource_pagerduty_addon.go -@@ -7,7 +7,7 @@ import ( - "time" - - "github.com/PagerDuty/go-pagerduty" -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-framework/diag" - "github.com/hashicorp/terraform-plugin-framework/path" - "github.com/hashicorp/terraform-plugin-framework/resource" -diff --git a/pagerdutyplugin/resource_pagerduty_business_service.go b/pagerdutyplugin/resource_pagerduty_business_service.go -index 18446709..b0e68bcd 100644 ---- a/pagerdutyplugin/resource_pagerduty_business_service.go -+++ b/pagerdutyplugin/resource_pagerduty_business_service.go -@@ -7,7 +7,7 @@ import ( - "time" - - "github.com/PagerDuty/go-pagerduty" -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" - "github.com/hashicorp/terraform-plugin-framework/diag" - "github.com/hashicorp/terraform-plugin-framework/path" -diff --git a/pagerdutyplugin/resource_pagerduty_service_dependency.go b/pagerdutyplugin/resource_pagerduty_service_dependency.go -index 4ef98439..d7487e29 100644 ---- a/pagerdutyplugin/resource_pagerduty_service_dependency.go -+++ b/pagerdutyplugin/resource_pagerduty_service_dependency.go -@@ -9,7 +9,7 @@ import ( - "time" - - "github.com/PagerDuty/go-pagerduty" -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" - "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" - "github.com/hashicorp/terraform-plugin-framework/attr" -diff --git a/pagerdutyplugin/resource_pagerduty_user_handoff_notification_rule.go b/pagerdutyplugin/resource_pagerduty_user_handoff_notification_rule.go -index 0549319e..555b89cd 100644 ---- a/pagerdutyplugin/resource_pagerduty_user_handoff_notification_rule.go -+++ b/pagerdutyplugin/resource_pagerduty_user_handoff_notification_rule.go -@@ -8,7 +8,7 @@ import ( - "time" - - "github.com/PagerDuty/go-pagerduty" -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-framework-validators/int64validator" - "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" - "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" -diff --git a/util/apiutil/search.go b/util/apiutil/search.go -index 66cc37d9..76a96b68 100644 ---- a/util/apiutil/search.go -+++ b/util/apiutil/search.go -@@ -4,7 +4,7 @@ import ( - "context" - "time" - -- "github.com/PagerDuty/terraform-provider-pagerduty/util" -+ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - ) - diff --git a/provider/go.mod b/provider/go.mod index b70c731e..63765239 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -3,7 +3,7 @@ module github.com/pulumi/pulumi-pagerduty/provider/v4 go 1.21 require ( - github.com/PagerDuty/terraform-provider-pagerduty/v3 v3.0.0 + github.com/PagerDuty/terraform-provider-pagerduty v0.0.0 github.com/pulumi/providertest v0.0.11 github.com/pulumi/pulumi-terraform-bridge/pf v0.37.0 github.com/pulumi/pulumi-terraform-bridge/v3 v3.84.0 @@ -12,7 +12,7 @@ require ( ) replace ( - github.com/PagerDuty/terraform-provider-pagerduty/v3 => ../upstream + github.com/PagerDuty/terraform-provider-pagerduty => ../upstream github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20240520223432-0c0bf0d65f10 ) diff --git a/provider/resources.go b/provider/resources.go index b4d76eac..84aace27 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -26,8 +26,8 @@ import ( // tzdata is used to ensure the provider works when deployed to OS-es that do not have it _ "time/tzdata" - "github.com/PagerDuty/terraform-provider-pagerduty/v3/pagerduty" - pagerdutyplugin "github.com/PagerDuty/terraform-provider-pagerduty/v3/pagerdutyplugin" + "github.com/PagerDuty/terraform-provider-pagerduty/pagerduty" + pagerdutyplugin "github.com/PagerDuty/terraform-provider-pagerduty/pagerdutyplugin" pftfbridge "github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge" "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge" diff --git a/scripts/upstream.sh b/scripts/upstream.sh index d35932e0..23ba9467 100755 --- a/scripts/upstream.sh +++ b/scripts/upstream.sh @@ -138,7 +138,7 @@ apply() { # apply the patch using a 3-way merge strategy. This mirrors the default behavior of 'git merge' cd upstream for patch in ../patches/*.patch; do - if ! git apply --3way "$patch"; then + if ! git apply --3way "$patch" --allow-empty; then cat <