-
Notifications
You must be signed in to change notification settings - Fork 126
Add import support for elasticsearch_script resource #1637
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
Co-authored-by: tobio <[email protected]>
|
@copilot add a change of entry for this PR |
Co-authored-by: tobio <[email protected]>
CHANGELOG.md
Outdated
|
|
||
| ### Changes | ||
|
|
||
| - Add import support for `elasticstack_elasticsearch_script` resource |
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.
@copilot update the changelog to reference this PR.
| - Add import support for `elasticstack_elasticsearch_script` resource | |
| - Add import support for `elasticstack_elasticsearch_script` resource ([#1637](https://github.com/elastic/terraform-provider-elasticstack/pull/1637)) |
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.
Updated in commit 17c6126
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.
Pull request overview
This PR adds import functionality to the elasticstack_elasticsearch_script resource, resolving a bug where users could not import existing Elasticsearch scripts into Terraform state.
Changes:
- Implements
ImportStatemethod using the standard<cluster_uuid>/<script_id>format - Adds comprehensive acceptance tests for the import functionality
- Updates CHANGELOG with the new feature
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| internal/elasticsearch/cluster/script/resource.go | Adds ImportState method and interface assertions to enable import functionality |
| internal/elasticsearch/cluster/script/acc_test.go | Adds acceptance test validating import behavior with proper cluster ID resolution |
| CHANGELOG.md | Documents the new import support feature |
Implementation Plan for elasticsearch_script Import Support
Summary
Successfully implemented import functionality for the
elasticstack_elasticsearch_scriptresource. The implementation:<cluster_uuid>/<script_id>consistent with other resourcesOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.