Building a Terraform Provider for Paddle Billing: Why Real‑Sandbox Testing Matters
说明与用途
为 Paddle Billing 构建了 Terraform 提供程序,使用真实沙箱测试确保 API 模式正确性。
问题
Existing tooling did not cover the full Paddle Billing catalog and lifecycle actions, forcing manual management via the dashboard.
结果
The provider enables declarative management of Paddle Billing resources, reduces manual dashboard work, and ensures correctness through real‑sandbox testing, catching bugs that mocks would miss.
工作流
- 1. Identify missing Paddle Billing features in existing tooling.
- 2. Design provider schema for products, prices, discounts, notification settings, and lifecycle actions.
- 3. Implement provider with data sources for subscriptions, transactions, customers, and events.
- 4. Add an OpenAPI spec vendor copy and run forward‑only contract checks against Paddle’s real sandbox API for every test run.
- 5. Implement an ephemeral resource for webhook signing secrets to avoid storing sensitive data in state.
- 6. Enable resource identity and list resources to support terraform query for bulk discovery and import.
- 7. Publish provider on Terraform Registry and host source on GitHub.
- 8. Continuously test against real sandbox accounts to catch schema mismatches.
证据
Every resource and data source is verified end‑to‑end against Paddle's real sandbox API before each release, not just tested against mocks.
Paddle publishes a proper machine‑readable OpenAPI spec for their whole API, auto‑generated from their own backend whenever it changes.
- 记录日期: 2026-09-05T12:16:58.438Z