Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Prevent spurious recreation of `elasticstack_fleet_agent_policy` resources due to 'changing' policy ids ([#885](https://github.com/elastic/terraform-provider-elasticstack/pull/885))
- Support `elasticstack_kibana_alerting_rule` resources with only one of `kql` or `timeframe` attributes set ([#886](https://github.com/elastic/terraform-provider-elasticstack/pull/886))
- Rename generated/fleet to generated/kibana, add data_view APIs. Keep libs/go-kibana-rest until migration can be completed. Clean and simplify the `elasticstack_kibana_data_view` resource to match the styling of Fleet resources. ([#881](https://github.com/elastic/terraform-provider-elasticstack/issues/881))
- Exposes internal objects needed to build a Crossplane Elasticstack provider ([#949](https://github.com/elastic/terraform-provider-elasticstack/pull/949))

## [0.11.11] - 2024-10-25

Expand Down
30 changes: 30 additions & 0 deletions xpprovider/xpprovider.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package xpprovider

import (
"context"
"github.com/elastic/terraform-provider-elasticstack/internal/clients"
"github.com/elastic/terraform-provider-elasticstack/internal/clients/config"
fwdiags "github.com/hashicorp/terraform-plugin-framework/diag"
)

// Package xpprovider exports needed internal types and functions used by Crossplane for instantiating, interacting and
// configuring the underlying Terraform Elasticstack providers.

// XPApiClient exports the internal type clients.ApiClient of the Terraform provider
type XPApiClient = clients.ApiClient

// XPProviderConfiguration exports the internal type config.ProviderConfiguration of the Terraform provider
type XPProviderConfiguration = config.ProviderConfiguration

// XPElasticsearchConnection exports the internal type config.ElasticsearchConnection of the Terraform provider
type XPElasticsearchConnection = config.ElasticsearchConnection

// XPKibanaConnection exports the internal type config.KibanaConnection of the Terraform provider
type XPKibanaConnection = config.KibanaConnection

// XPFleetConnection exports the internal type config.FleetConnection of the Terraform provider
type XPFleetConnection = config.FleetConnection

func NewApiClientFromFramework(ctx context.Context, config XPProviderConfiguration, version string) (*XPApiClient, fwdiags.Diagnostics) {
return clients.NewApiClientFromFramework(ctx, config, version)
}
Loading