Repository navigation
refactor: separate platform and IaC resource/datasource base types [ENG-9440] - #266
Open
albertodonato wants to merge 1 commit into
Open
albertodonato wants to merge 1 commit into
albertodonato wants to merge 1 commit into
Conversation
albertodonato
added this pull request to stack #267
October 23, 2026 14:57
albertodonato
marked this pull request as ready for review
October 23, 2026 14:58
There was a problem hiding this comment.
No issues found across 60 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant TF as Terraform Core
participant R as Resource/DataSource<br/>(e.g., accountResource)
participant B as Base Type<br/>apiResource[T]/apiDataSource[T]
participant PD as ProviderData<br/>Internal
participant API as API Client<br/>(*platform.API or *iac.API)
Note over TF,API: Provider Configure & Runtime Flow
TF->>R: Configure request
R->>B: Call embedded Configure()
B->>PD: GetAPI[T]("resource"/"datasource", ProviderData)
alt ProviderData not nil
PD->>PD: Type switch on T
alt T = *platform.API
PD->>B: Return PlatformAPI
else T = *iac.API
PD->>B: Return IaCAPI
end
B->>B: Store API client in api field
B-->>TF: No diagnostics
else ProviderData is nil
PD-->>B: Return nil API
B-->>TF: No diagnostics (nil API)
else ProviderData has wrong type
PD-->>B: providerDataError
B-->>TF: Add diagnostic error
end
Note over TF,API: Runtime CRUD Operations
TF->>R: Read/Create/Update/Delete
R->>B: Access api field
B-->>R: API client instance
R->>API: Call platform/IaC API endpoint
API-->>R: Response
albertodonato
force-pushed
the
ack/split-api-resource-datasource
branch
from
October 23, 2026 16:01
0672022 to
b6d22be
Compare
…NG-9440] [ENG-9440](https://stacklet.atlassian.net/browse/ENG-9440) ### what Define separate base types for resources and datasources related to platform and sinistral, each one carrying an `api` attribute pointing to the corresponding API class ### why Each resource/datasource interacts with only one API ### testing updated tests ### docs n/a
albertodonato
force-pushed
the
ack/split-api-resource-datasource
branch
from
October 23, 2026 16:02
b6d22be to
5eb1c61
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ENG-9440
what
Define separate base types for resources and datasources related to platform
and sinistral, each one carrying an
apiattribute pointing to thecorresponding API class
why
Each resource/datasource interacts with only one API
testing
updated tests
docs
n/a
Stack created with GitHub Stacks CLI • Give Feedback 💬