-
Notifications
You must be signed in to change notification settings - Fork 121
Add elasticstack_kibana_default_data_view resource to manage default data view #1379
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]>
Co-authored-by: tobio <[email protected]>
Co-authored-by: tobio <[email protected]>
b9dd33a to
9b64020
Compare
…ata-view-resource * origin/main: chore(deps): update golang:1.25.3 docker digest to bce1e7e (#1382) Clean before regenerating the client Clean before regenerating the client Use a working API spec chore(deps): update kibana-openapi-spec digest to 9b8ef82 (#1377) Include the generated client in the post upgrade task
|
@tobio , shouldn't the default setting of a dataview be better of as a property of the dataview resource itself rather a separate resource? Or is the API built weird here? |
@Kushmaro setting the default dataview is a distinct API endpoint, rather than a property of the dataview itself, so we're partly modelling that. We could still make this a property of the dataview resource, and just make multiple API calls, I did think about doing that, but IMO having a separate resource makes a little more sense:
So it feels like defining this in the dataview resource itself, actually becomes |
Overview
This PR implements a new
elasticstack_kibana_default_data_viewresource that allows users to programmatically set the default Kibana data view, addressing the feature request in issue #XXX.Previously, users could only set the default data view manually through the Kibana UI (see screenshot below). This resource enables automated management of this setting through Terraform.
Changes
New Resource:
elasticstack_kibana_default_data_viewSchema:
data_view_id(required, string): The data view identifier to set as defaultforce(optional, bool, default: true): Update an existing default data view identifierskip_delete(optional, bool, default: false): If true, the default data view will not be unset when the resource is destroyedExample Usage:
Implementation Details
skip_deleteflagFiles Added
internal/kibana/default_data_view/- Complete resource implementation with CRUD operations, schema, models, and testsexamples/resources/elasticstack_kibana_default_data_view/resource.tf- Example configurationdocs/resources/kibana_default_data_view.md- Generated documentationTesting
✅ All acceptance tests pass:
✅ Manual end-to-end testing completed and verified all scenarios:
Related Issues
Closes #XXX
Original prompt
Fixes #603
💡 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.