Skip to content
Merged
Changes from 1 commit
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
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