-
Notifications
You must be signed in to change notification settings - Fork 114
Migrate Elasticsearch enrich policy resource and data source to Terraform Plugin Framework #1220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ata source Co-authored-by: tobio <[email protected]>
Co-authored-by: tobio <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to remove the old SDK based code as well.
@copilot make sure that |
…mentation Co-authored-by: tobio <[email protected]>
Done! Removed all old SDK v2 files (policy.go, policy_data_source.go, policy_test.go, policy_data_source_test.go) and their references from provider.go. Commit 724c139 |
Co-authored-by: tobio <[email protected]>
Co-authored-by: tobio <[email protected]>
Both |
…ad logic Co-authored-by: tobio <[email protected]>
…es, fix test assertion Co-authored-by: tobio <[email protected]>
…description Co-authored-by: tobio <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make lint
is failing as the docs weren't updated as part of the change to a SetAttribute
. Run make docs-generate
and commit the result.
…ttribute Co-authored-by: tobio <[email protected]>
Documentation has been updated by running |
This PR migrates the
elasticstack_elasticsearch_enrich_policy
resource and data source from Terraform SDK v2 to the Terraform Plugin Framework, following the established pattern used in the system user migration.Changes
New Plugin Framework Implementation:
internal/elasticsearch/enrich/
Key Files Added:
resource.go
- Main resource and data source definitionsschema.go
- Plugin Framework schema with proper validatorsmodels.go
- Framework data modelscreate.go
- Create/Update operationsread.go
- Read operations for both resource and data sourcedelete.go
- Delete operationsacc_test.go
- Plugin Framework acceptance tests including legacy migration testProvider Integration:
provider/plugin_framework.go
Testing:
TestAccResourceEnrichPolicyFromSDK
test to verify legacy resource migrationThe migration maintains full backward compatibility while providing the benefits of the Plugin Framework including better type safety, improved validation, and enhanced developer experience.
Fixes #1219.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.