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 of datasources and resources to terraform plugin framework #816

Merged
merged 10 commits into from
May 2, 2024

Conversation

cjgajard
Copy link
Contributor

@cjgajard cjgajard commented Feb 6, 2024

  • d93c6bc Migrate data source extension schema
  • 2595caa Migrate resource extension servicenow
  • adc4d2b Migrate resource pagerduty_extension
  • abea7ca Migrate resource tag assigment
  • d2aab19 Migrate datasource and resource pagerduty_tag CSGI-2808 CSGI-2809
  • 235a0bd Add util.TimeNowInLoc and testAccTimeNow
  • 1fee49e Add use state to resource business service id

Acceptance tests results after migration...

Running acceptance tests for...
  - TestAccDataSourcePagerDutyExtensionSchema
  - TestAccPagerDutyExtensionServiceNow
  - TestAccPagerDutyExtension
  - TestAccPagerDutyTagAssignment
  - TestAccDataSourcePagerDutyTag
  - TestAccPagerDutyTag
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -count=1 -run TestAccDataSourcePagerDutyExtensionSchema -timeout 120m
?       github.com/PagerDuty/terraform-provider-pagerduty       [no test files]
testing: warning: no tests to run
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/pagerduty     0.370s [no tests to run]
=== RUN   TestAccDataSourcePagerDutyExtensionSchema_Basic
--- PASS: TestAccDataSourcePagerDutyExtensionSchema_Basic (8.10s)
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/pagerdutyplugin       9.067s
testing: warning: no tests to run
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/util  0.659s [no tests to run]
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -count=1 -run TestAccPagerDutyExtensionServiceNow -timeout 120m
?       github.com/PagerDuty/terraform-provider-pagerduty       [no test files]
testing: warning: no tests to run
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/pagerduty     0.367s [no tests to run]
=== RUN   TestAccPagerDutyExtensionServiceNow_import
--- PASS: TestAccPagerDutyExtensionServiceNow_import (23.13s)
=== RUN   TestAccPagerDutyExtensionServiceNow_Basic
--- PASS: TestAccPagerDutyExtensionServiceNow_Basic (29.69s)
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/pagerdutyplugin       53.497s
testing: warning: no tests to run
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/util  0.787s [no tests to run]
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -count=1 -run TestAccPagerDutyExtension -timeout 120m
?       github.com/PagerDuty/terraform-provider-pagerduty       [no test files]
testing: warning: no tests to run
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/pagerduty     1.544s [no tests to run]
=== RUN   TestAccPagerDutyExtensionServiceNow_import
--- PASS: TestAccPagerDutyExtensionServiceNow_import (23.19s)
=== RUN   TestAccPagerDutyExtension_import
--- PASS: TestAccPagerDutyExtension_import (58.47s)
=== RUN   TestAccPagerDutyExtensionServiceNow_Basic
--- PASS: TestAccPagerDutyExtensionServiceNow_Basic (39.04s)
=== RUN   TestAccPagerDutyExtension_Basic
--- PASS: TestAccPagerDutyExtension_Basic (31.93s)
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/pagerdutyplugin       154.435s
testing: warning: no tests to run
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/util  1.906s [no tests to run]
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -count=1 -run TestAccPagerDutyTagAssignment -timeout 120m
?       github.com/PagerDuty/terraform-provider-pagerduty       [no test files]
testing: warning: no tests to run
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/pagerduty     0.670s [no tests to run]
=== RUN   TestAccPagerDutyTagAssignment_import
--- PASS: TestAccPagerDutyTagAssignment_import (13.90s)
=== RUN   TestAccPagerDutyTagAssignment_User
--- PASS: TestAccPagerDutyTagAssignment_User (34.09s)
=== RUN   TestAccPagerDutyTagAssignment_Team
--- PASS: TestAccPagerDutyTagAssignment_Team (29.29s)
=== RUN   TestAccPagerDutyTagAssignment_EP
--- PASS: TestAccPagerDutyTagAssignment_EP (47.72s)
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/pagerdutyplugin       125.929s
testing: warning: no tests to run
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/util  1.145s [no tests to run]
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -count=1 -run TestAccDataSourcePagerDutyTag -timeout 120m
?       github.com/PagerDuty/terraform-provider-pagerduty       [no test files]
testing: warning: no tests to run
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/pagerduty     1.209s [no tests to run]
=== RUN   TestAccDataSourcePagerDutyTag_Basic
--- PASS: TestAccDataSourcePagerDutyTag_Basic (6.78s)
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/pagerdutyplugin       8.230s
testing: warning: no tests to run
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/util  1.827s [no tests to run]
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -count=1 -run TestAccPagerDutyTag -timeout 120m
?       github.com/PagerDuty/terraform-provider-pagerduty       [no test files]
testing: warning: no tests to run
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/pagerduty     0.367s [no tests to run]
=== RUN   TestAccPagerDutyTagAssignment_import
--- PASS: TestAccPagerDutyTagAssignment_import (13.06s)
=== RUN   TestAccPagerDutyTag_import
--- PASS: TestAccPagerDutyTag_import (8.20s)
=== RUN   TestAccPagerDutyTagAssignment_User
--- PASS: TestAccPagerDutyTagAssignment_User (33.55s)
=== RUN   TestAccPagerDutyTagAssignment_Team
--- PASS: TestAccPagerDutyTagAssignment_Team (27.08s)
=== RUN   TestAccPagerDutyTagAssignment_EP
--- PASS: TestAccPagerDutyTagAssignment_EP (39.22s)
=== RUN   TestAccPagerDutyTag_Basic
--- PASS: TestAccPagerDutyTag_Basic (10.97s)
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/pagerdutyplugin       132.653s
testing: warning: no tests to run
PASS
ok      github.com/PagerDuty/terraform-provider-pagerduty/util  0.671s [no tests to run]

@cjgajard cjgajard marked this pull request as ready for review April 2, 2024 19:40
@cjgajard cjgajard force-pushed the tpf-tag branch 2 times, most recently from eb3b1f3 to 542c724 Compare April 4, 2024 17:01
@cjgajard cjgajard changed the title [CSGI-2808] [CSGI-2809] Migrate datasource and resource pagerduty_tag Migrate pack of datasources and resources to terraform plugin framework Apr 4, 2024
Copy link
Contributor

@imjaroiswebdev imjaroiswebdev left a comment

Choose a reason for hiding this comment

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

@cjgajard Great job so far with the migration of all these TF objects to Terraform Plugin Framework, however there are some comments to address before proceeding with merging.

pagerdutyplugin/data_source_pagerduty_extension_schema.go Outdated Show resolved Hide resolved
pagerdutyplugin/data_source_pagerduty_tag.go Outdated Show resolved Hide resolved
pagerdutyplugin/resource_pagerduty_extension_servicenow.go Outdated Show resolved Hide resolved
pagerdutyplugin/resource_pagerduty_extension_servicenow.go Outdated Show resolved Hide resolved
pagerdutyplugin/resource_pagerduty_tag_assignment.go Outdated Show resolved Hide resolved
Copy link
Contributor

@imjaroiswebdev imjaroiswebdev left a comment

Choose a reason for hiding this comment

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

Awesome job with the migration of these TF objects to Terraform Plugin Framework 🎉 💪🏽

@imjaroiswebdev imjaroiswebdev merged commit 109d59e into PagerDuty:master May 2, 2024
1 check passed
@cjgajard cjgajard deleted the tpf-tag branch May 3, 2024 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants