Skip to content

Conversation

@ssicard
Copy link

@ssicard ssicard commented Nov 12, 2025

This adds migration tests for the logpush_job resource. Below is a more granular listing of all changes:

  • adds zone level resources to logpush_job sweep
  • adds migration tests for both account-level logpush jobs and zone-level

Note: resource.go was updated for this resource to account for less options for kind (no instant-logs supported)

Acceptance test run results

  • I have run acceptance tests for my changes and included the results below
=== RUN   TestMigrateCloudflareLogpushJob_Migration_Basic_MultiVersion
=== RUN   TestMigrateCloudflareLogpushJob_Migration_Basic_MultiVersion/from_v4_52_1
--- PASS: TestMigrateCloudflareLogpushJob_Migration_Basic_MultiVersion (18.01s)
    --- PASS: TestMigrateCloudflareLogpushJob_Migration_Basic_MultiVersion/from_v4_52_1 (18.01s)
=== RUN   TestMigrateCloudflareLogpushJob_Migration_OutputOptions
--- PASS: TestMigrateCloudflareLogpushJob_Migration_OutputOptions (15.43s)
=== RUN   TestMigrateCloudflareLogpushJob_Migration_InstantLogs
--- PASS: TestMigrateCloudflareLogpushJob_Migration_InstantLogs (16.20s)
PASS
ok      github.com/cloudflare/terraform-provider-cloudflare/internal/services/logpush_job       51.040s

Additional context & links

@ssicard ssicard marked this pull request as ready for review November 12, 2025 20:15
@ssicard ssicard self-assigned this Nov 12, 2025
Copy link
Author

Choose a reason for hiding this comment

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

Updates are being made in resource.go to account for an update in kind in logpush_job resource. instant-logs was a valid kind option in v4, but is not valid in v5. The API was adding instant-logs back to the state even though it was not valid, so we explicitly ignore that as a value.

@ssicard ssicard force-pushed the ssicard/logpush-job branch from 51ed600 to 00a15e7 Compare November 12, 2025 21:28
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.

1 participant