How wombelix/terraform-provider-sourcehut works
Main Components
a) Provider Core
• Configuration handling and authentication flow
• Provider_test.go component for testing infrastructure
b) Resource Handlers (Left Side)
• Resource handlers:
• resource_repo.go (Repository management)
• resource_ssh_key.go (SSH key management)
• resource_pgp_key.go (PGP key management)
• Their relationship to the provider core
c) Data Source Handlers (Right Side)
• Data source handlers:
• data_source_blob.go
• data_source_paste.go
• data_source_repo.go
• data_source_user.go
• Them to the provider core
d) External Interactions (Top)
• sourcehut API connection
• Terraform/OpenTofu Plugin SDK interface
• Authentication mechanism
Relationship Flows
• Terraform/OpenTofu |
• Plugin System |
• ↕
• Provider Core |
• (provider.go) |
• ↙ ↘
• Resource | | Data |
• Handlers | | Sources |
• ↓ ↓
• sourcehut API |
Implementation Details
• Rectangles: Main components
• Hexagons: External services
• Diamonds: Decision points
• Component types
• Special symbols
Additional Elements
• Version information
• Build/CI integration points
• Configuration flow
• Document error handling paths