Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 11, 2025

  • Migrate the Elasticsearch script resource to the terraform-plugin-framework
  • Remove StringIsJSON validator and replace with jsontypes.NormalizedType
  • Update condition checks to use utils.IsKnown() properly
  • Migrate client functions to return framework diagnostics instead of SDK diagnostics
  • Extract core read logic into helper function and reuse in update operations
  • Clean up unused imports and code
  • Remove duplicate framework functions and update original functions to return framework diagnostics
  • Move read helper function from update.go to read.go
  • Remove legacy SDKv2 script resource implementation and SDK wrapper functions

Latest Changes

Complete migration to Plugin Framework with full removal of legacy SDKv2 code:

  1. Removed SDK wrapper functions: Deleted GetScriptSDK, PutScriptSDK, and DeleteScriptSDK functions from internal/clients/elasticsearch/cluster.go as they are no longer needed.

  2. Removed legacy SDKv2 resource: Completely removed internal/elasticsearch/cluster/script.go which contained the old SDKv2 script resource implementation.

  3. Maintained Plugin Framework resource: The new script resource in internal/elasticsearch/cluster/script/ remains fully functional and properly registered in the Plugin Framework provider.

The migration is now complete with no legacy SDKv2 code remaining. All tests pass and the resource works correctly with the Plugin Framework.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@cla-checker-service
Copy link

cla-checker-service bot commented Sep 11, 2025

💚 CLA has been signed

Copilot AI and others added 3 commits September 11, 2025 09:55
Co-authored-by: tobio <444668+tobio@users.noreply.github.com>
Co-authored-by: tobio <444668+tobio@users.noreply.github.com>
Co-authored-by: tobio <444668+tobio@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate the Elasticsearch script resource to the terraform-plugin-framework Migrate the Elasticsearch script resource to the terraform-plugin-framework Sep 11, 2025
Copilot AI requested a review from tobio September 11, 2025 10:04
Copilot finished work on behalf of tobio September 11, 2025 10:04
tobio

This comment was marked as outdated.

…ework diagnostics

Co-authored-by: tobio <444668+tobio@users.noreply.github.com>

This comment was marked as outdated.

Co-authored-by: tobio <444668+tobio@users.noreply.github.com>
Copilot finished work on behalf of tobio September 11, 2025 10:42
Copilot AI requested a review from tobio September 11, 2025 10:42
tobio

This comment was marked as outdated.

…ramework diagnostics and move read function to read.go

Co-authored-by: tobio <444668+tobio@users.noreply.github.com>
Copilot AI requested a review from tobio September 11, 2025 11:15
Copilot finished work on behalf of tobio September 11, 2025 11:15
@tobio
Copy link
Member

tobio commented Sep 13, 2025

cla/check

tobio

This comment was marked as outdated.

…quested in review

Co-authored-by: tobio <444668+tobio@users.noreply.github.com>
Copilot AI changed the title Migrate the Elasticsearch script resource to the terraform-plugin-framework Migrate the Elasticsearch script resource to the terraform-plugin-framework and remove legacy SDKv2 implementation Sep 14, 2025
Copilot finished work on behalf of tobio September 14, 2025 09:57
Copilot AI requested a review from tobio September 14, 2025 09:57
@tobio tobio marked this pull request as ready for review September 15, 2025 12:06
wandergeek
wandergeek previously approved these changes Sep 23, 2025
* origin/main:
  fix: nil reference in api.kibana_synthetics.go:418 in case of unmarshable arrays (#1320)
  Bump github.com/hashicorp/terraform-plugin-framework (#1326)
  Bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.37.0 to 2.38.0 (#1325)
  chore(deps): update golang:1.25.1 docker digest to 8305f5f (#1322)
  Clarify how acceptance tests should be run (#1324)
  Move diag utilities from utils to dedicated diagutil package (#1317)
  Add support for Kafka Fleet output types. (#1302)
  Allow a default for `allow_restricted_indices` within an API Key role descriptor (#1315)
  Improve docs generation (#1313)
  Add optional preventInitialBackfill for SLO API (#1071)
  Add support for dataViewId (#1305)
  [Feature] Add unenrollment_timeout parameter to Fleet Agent Policy resource (#1306)
  chore(deps): update actions/setup-go action to v6 (#1301)
  chore(deps): update golang docker tag to v1.25.1 (#1300)
  Update generated SLO client.  (#1303)
@tobio tobio merged commit eba1397 into main Sep 23, 2025
50 checks passed
@tobio tobio deleted the copilot/fix-1297 branch September 23, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants