New Squaredup Dashboard Image Resource#129
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces support for dashboard images by implementing a new resource that manages image uploads for dashboard tiles. Key changes include the addition of resource CRUD operations and its acceptance tests, updates to the provider registration and models, as well as corresponding documentation.
Reviewed Changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/provider/resource_dashboard_image_test.go | Added acceptance tests for the dashboard image resource. |
| internal/provider/resource_dashboard_image.go | Implements the CRUD and state management for the dashboard image resource. |
| internal/provider/provider.go | Registers the new dashboard image resource with the provider. |
| internal/provider/models.go | Introduces models for handling dashboard image data. |
| internal/provider/client_dashboard_image.go | Adds client functions for interacting with dashboard image endpoints. |
| docs/resources/dashboard_image.md | Provides documentation and example usage of the new resource. |
Files not reviewed (3)
- cspell.json: Language not supported
- examples/resources/squaredup_dashboard_image/import.sh: Language not supported
- examples/resources/squaredup_dashboard_image/resource.tf: Language not supported
Comments suppressed due to low confidence (1)
internal/provider/resource_dashboard_image.go:34
- The field 'WorkspacId' appears to be misspelled; consider renaming it to 'WorkspaceId' for consistency with the resource schema attribute.
WorkspacId types.String `tfsdk:"workspace_id"`
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for dashboard image resources by implementing the dashboard image CRUD operations, updating the provider mapping, and adding acceptance tests and documentation.
- Added acceptance tests for dashboard image operations.
- Implemented core CRUD methods and client functions for dashboard image API.
- Updated provider registration and resource documentation.
Reviewed Changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/provider/resource_dashboard_image_test.go | Acceptance tests for dashboard image resource including create, import, and update scenarios. |
| internal/provider/resource_dashboard_image.go | CRUD implementation of the dashboard image resource using the SquaredUp client. |
| internal/provider/provider.go | Registered the dashboard image resource with the provider. |
| internal/provider/models.go | Added model definitions for DashboardImage and DashboardImageMetadata. |
| internal/provider/client_dashboard_image.go | Implemented client methods for uploading, retrieving, and deleting dashboard images. |
| docs/resources/dashboard_image.md | Added resource documentation and example usage for dashboard image resource. |
Files not reviewed (3)
- cspell.json: Language not supported
- examples/resources/squaredup_dashboard_image/import.sh: Language not supported
- examples/resources/squaredup_dashboard_image/resource.tf: Language not supported
Comments suppressed due to low confidence (1)
internal/provider/resource_dashboard_image_test.go:13
- [nitpick] The local variable 'uuid' shadows the imported package name 'uuid'. Consider renaming it (e.g., to uniqueID) to avoid potential confusion in the test file.
uuid := uuid.NewRandom().String()
Co-Authored-By: Dave Clarke <3793131+clarkd@users.noreply.github.com>
Description
Checklist:
bug-fix,feature, orenhancement