How bsquare-corp/terraform-provider-skopeo2 works
Main Components
a. Core Provider Components:
• Provider Configuration Layer
• Main provider setup (internal/provider/provider.go)
• Resource definitions (internal/provider/resource_skopeo2_copy.go)
b. Internal Service Layer:
• Skopeo Integration Service (internal/skopeo/)
• Copy operations
• Inspect operations
• Login handling
• Context management
c. External Interfaces:
• Terraform Plugin SDK Integration
• Container Registry Interactions
• Authentication Systems
┌─────────────────────────────────────────────┐
• Terraform Core │
• ┘
• ↕
┌─────────────────────────────────────────────┐
• Terraform Plugin SDK │
• ┘
• ↕
┌─────────────────────────────────────────────┐
• Skopeo2 Provider Interface Layer │
• ┌─────────────┐ ┌────────────────────┐ │
• Provider │ │ Resource: Copy │ │
• Configuration│ │ │ │
• ┘ └────────────────────┘ │
• ┘
• ↕
┌─────────────────────────────────────────────┐
• Internal Skopeo Integration Layer │
• ┌─────────┐ ┌───────┐ ┌───────┐ ┌─────┐ │
• Copy │ │Inspect│ │ Login │ │Utils│ │
• ┘ └───────┘ └───────┘ └─────┘ │
• ┘
• ↕
┌─────────────────────────────────────────────┐
• Container Registries │
• ┘
Important Details to Highlight
a. Provider Configuration Flow:
• How the provider initializes and configures Skopeo operations
• Authentication flow for container registries
b. Resource Operations:
• Copy resource's CRUD operations
• Interaction with the Skopeo integration layer
c. Integration Points:
• Interfaces with external container registries
• Authentication mechanisms
Technical Details
• Go version requirement (>= 1.19)
• Terraform version compatibility (>= 0.13.x)
• Key dependencies and their versions