How kong/terraform-provider-konnect works
Main Components Identification
The system should be divided into these primary components:
• Provider Core
• Resource Management Layer
• SDK Layer
• External Integration (Kong Konnect API)
Detailed Architecture Breakdown
a) Core Provider Layer:
• Entry point through main.go
• Provider configuration handling
• Authentication management (PAT and system tokens)
• Regional server URL configuration
b) Resource Management Layer:
• Organized by domain categories:
• Gateway Manager resources
• Cloud Gateway resources
• Kong Gateway entities
• Mesh resources
• API Products
• Dev Portal
• Organization management
c) SDK Layer:
• Internal SDK implementation (internal/sdk)
• Models and operations
• API client functionality
• Error handling
Top Level:
[Terraform Core] <---> [Konnect Provider] <---> [Kong Konnect API]
Second Level (Provider Internals):
[Provider Configuration]
[Resource Management Layer] <---> [Internal SDK]
[Validators & Plan Modifiers]
Component Relationship Details
• Provider initialization flow
• Resource CRUD operations flow
• Authentication token handling
• API request/response cycle
• Validation and plan modification processes
Implementation Details
Specific components for:
• Resource types (from internal/provider)
• SDK models (from internal/sdk/models)
• Validators (from internal/validators)
• Plan modifiers (from internal/planmodifiers)
Notes Section
Notes about:
• Configuration requirements
• Environment variable usage
• Regional deployment considerations
• Resource dependency handling